last ...
This commit is contained in:
@@ -4877,10 +4877,11 @@ protected:
|
|||||||
|
|
||||||
//
|
//
|
||||||
bool isMarginPassed = IsMarginPassed();
|
bool isMarginPassed = IsMarginPassed();
|
||||||
if (!isMarginPassed)
|
bool isDrawdownPassed = IsDrawdownPassed();
|
||||||
|
if (!isDrawdownPassed)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string message = "No Margin For Execute Signals ...";
|
string message = "Desn't Have Good State For Execute Signals ...";
|
||||||
|
|
||||||
//
|
//
|
||||||
Alert(message);
|
Alert(message);
|
||||||
@@ -4999,6 +5000,24 @@ protected:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool IsDrawdownPassed() {
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
double maxAllowedDrawdownPercent = 5; // MaxAllowedDrawdownPercent();
|
||||||
|
double drawdownPercent = GetDrawdownPercent();
|
||||||
|
|
||||||
|
//
|
||||||
|
result = maxAllowedDrawdownPercent <=0
|
||||||
|
? true
|
||||||
|
: drawdownPercent <= maxAllowedDrawdownPercent;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// EQM Functions ...
|
// EQM Functions ...
|
||||||
|
|
||||||
@@ -5125,16 +5144,15 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isForce = mSetups[setupIDX].ForceState();
|
// bool isForce = mSetups[setupIDX].ForceState();
|
||||||
if (!isForce)
|
if (!mForce)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check Delay Between Two Signals ...
|
// TODO: Implement this later ...
|
||||||
bool isMarginPassed = IsMarginPassed();
|
return;
|
||||||
bool isDelayPassed = IsSignalDelayPassed(signal);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
XSignal signals[];
|
XSignal signals[];
|
||||||
@@ -5226,6 +5244,29 @@ protected:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Exit From Force State ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// One: Based On Positions Count ...
|
||||||
|
XPosition positions[];
|
||||||
|
int positionsCount = mTrader.GetPositions(positions);
|
||||||
|
if (!IsValidSize(positionsCount)) {
|
||||||
|
//
|
||||||
|
mForce = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Two: Based On Free Margin ...
|
||||||
|
bool isMarginPassed = IsMarginPassed();
|
||||||
|
bool isDrawdownPassed = IsDrawdownPassed();
|
||||||
|
if (isDrawdownPassed) {
|
||||||
|
//
|
||||||
|
mForce = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Additional Works on Force States ...
|
// Additional Works on Force States ...
|
||||||
// TODO: Complete this ...
|
// TODO: Complete this ...
|
||||||
|
|||||||
+2
-1
@@ -7,6 +7,7 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"C_Cpp.default.includePath": [
|
"C_Cpp.default.includePath": [
|
||||||
"c:\\Users\\saherelm\\AppData\\Roaming\\MetaQuotes\\Terminal\\FAE4959D5A0334AE230243FCFFFD4053\\MQL5\\Include"
|
"c:\\Users\\saherelm\\AppData\\Roaming\\MetaQuotes\\Terminal\\FAE4959D5A0334AE230243FCFFFD4053\\MQL5\\Include"
|
||||||
]
|
],
|
||||||
|
"C_Cpp.clang_format_style": "file:c:\\Users\\SaherElm\\.vscode\\extensions\\l-i-v.mql-tools-2.1.0\\files\\.clang-format"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user