This commit is contained in:
2024-05-25 04:25:11 +03:30
parent 7a50508816
commit da63c4cb71
9 changed files with 3522 additions and 165 deletions
+29 -1
View File
@@ -29,6 +29,14 @@
// Define On Signal Event Handler Type ...
typedef void (*TOnSignal)(XSignal &signals[]);
//
// Model Account Profits ...
struct XProfitTracker {
//
int count; // Number of Positions ...
};
//
// Class Definition ...
@@ -535,7 +543,7 @@ public:
//
// Draw On Chart if anything is required ...
virtual void Draw() {}
//
// Check For any Guard Actions ...
virtual bool CheckForGuard(XGuard &guards[])
@@ -566,6 +574,19 @@ public:
return false;
}
//
// Regulary Filtered Signals passed to this
// and here we can do Additional Signal Filtering
// for Signal Management such as (Providers and etc) ...
virtual int HandleSignalManagement(XSignal &signals[])
{
//
int result = ArraySize(signals);
//
return result;
}
//
// Here we Have to Check Market based
// on our Strategy for Trading ...
@@ -623,6 +644,13 @@ public:
return;
}
//
int managedSignalsCount = HandleSignalManagement(filteredSignals);
if (managedSignalsCount <= 0)
{
return;
}
//
// Try to Execute Signals ...
ENUM_X_SIGNAL_EXECUTION_RESULT reasons[];