This commit is contained in:
2025-01-18 12:16:28 +03:30
parent 9cdd5b4c7d
commit e74f64c51e
10 changed files with 2111 additions and 1003 deletions
+45 -6
View File
@@ -984,7 +984,7 @@ class XC121SMCExpert : public XCBaseExpert
//
signal.Clean();
conditions.Clean();
conditions.Clean();
}
//
@@ -2001,11 +2001,17 @@ class XC121SMCExpert : public XCBaseExpert
//
string comment = "Guard Close All ...";
string message = "Guard Close All (" + ToString(positionsCount) + ") Positions Successfully ...";
mTradeHandler.ForceClose(
int forceClosed = mTradeHandler.ForceClose(
positions,
comment,
message //
);
//
if (forceClosed)
{
RestEA(120 * 60);
}
}
}
@@ -2040,11 +2046,17 @@ class XC121SMCExpert : public XCBaseExpert
//
string comment = "Guard Close Longs ...";
string message = "Guard Close (" + ToString(longPositionsCount) + ") Long Positions Successfully ...";
mTradeHandler.ForceClose(
bool isClosed = mTradeHandler.ForceClose(
longPositions,
comment,
message //
);
//
if (isClosed)
{
RestEA(120 * 60);
}
}
}
@@ -2079,11 +2091,17 @@ class XC121SMCExpert : public XCBaseExpert
//
string comment = "Guard Close Shorts ...";
string message = "Guard Close (" + ToString(shortPositionsCount) + ") Short Positions Successfully ...";
mTradeHandler.ForceClose(
bool isClosed = mTradeHandler.ForceClose(
shortPositions,
comment,
message //
);
//
if (isClosed)
{
RestEA(120 * 60);
}
}
}
@@ -2114,11 +2132,17 @@ class XC121SMCExpert : public XCBaseExpert
//
string comment = "Guard Close ...";
string message = "Guard Close " + (isLong ? "Long" : "Short") + " Position: (" + ToString(iGuard.ticket) + ") Successfully ...";
mTradeHandler.ForceClose(
bool isClosed = mTradeHandler.ForceClose(
positions,
comment,
message //
);
//
if (isClosed)
{
RestEA(120 * 60);
}
}
}
@@ -2181,6 +2205,9 @@ class XC121SMCExpert : public XCBaseExpert
iPosition,
comment //
);
//
RestEA(120 * 60);
}
}
}
@@ -2238,11 +2265,17 @@ class XC121SMCExpert : public XCBaseExpert
//
string comment = "Guard Hedge ...";
string message = "Guard Hedge (" + ToString(count) + ") Positions by: (" + ToString(profits) + ") Successfully ...";
mTradeHandler.ForceClose(
bool isClosed = mTradeHandler.ForceClose(
positions,
comment,
message //
);
//
if (isClosed)
{
RestEA(120 * 60);
}
}
}
}
@@ -2335,6 +2368,12 @@ class XC121SMCExpert : public XCBaseExpert
ArrayFree(guards);
}
//
void RestEA(int seconds)
{
//
}
//
};