This commit is contained in:
2025-01-04 05:19:28 +03:30
parent fbc232a2b7
commit 6f61bc6d30
8 changed files with 783 additions and 143 deletions
@@ -3278,7 +3278,11 @@ class XC121SMCTradeHandler : public XCBaseAlert
DrawX121SMCStrategyConditions(
conditions,
conditionsObjects,
mDrawer //
mDrawer,
true,
true, // Analyse Price Zones ...
true, // Decision Zone ...
true // Only Box ...
);
}
+10 -4
View File
@@ -1328,12 +1328,13 @@ class XC121SMCExpert : public XCBaseExpert
string forceCloseTimeStr = CloseAllTradesAt();
datetime forceCloseTime = ParseDateTimeFromTimeString(forceCloseTimeStr);
bool canForceClose = IsTimeInRange(
TimeCurrent(),
forceCloseTime //
);
TimeCurrent(),
forceCloseTime //
) &&
!mIsForceCloseAtTime;
if (canForceClose)
{
mTradeHandler.ForceClose();
mIsForceCloseAtTime = mTradeHandler.ForceClose();
}
//
@@ -1462,6 +1463,8 @@ class XC121SMCExpert : public XCBaseExpert
*/
void HandleOnNewDay() override
{
//
mIsForceCloseAtTime = false;
mTradeHandler.ResumePausedSymbols();
}
@@ -1753,6 +1756,9 @@ class XC121SMCExpert : public XCBaseExpert
string mStopTradeAt; // Enable Trade on Signals on Time ...
string mCloseAllTradesAt; // Enable Close All Trades on Signals on Time ...
//
bool mIsForceCloseAtTime;
//
// Risk Management Props ...
double mR2R; // Signallers Risk to Reward Ratio ...
+8 -3
View File
@@ -516,7 +516,8 @@ int DrawX121SMCStrategyConditions(
XCPOIDrawer *drawer,
bool drawMarketStructure = true,
bool drawPriceZones = true,
bool drawDecisionZones = true //
bool drawDecisionZones = true,
bool drawOnlyPriceZonesBoundary = true //
)
{
//
@@ -545,7 +546,9 @@ int DrawX121SMCStrategyConditions(
XCBaseObject *objects[];
int objectsCount = drawer.DrawPriceZone(
conditions.priceZones,
objects //
objects,
conditions.signalDir,
drawOnlyPriceZonesBoundary //
);
if (IsValidSize(objectsCount))
{
@@ -567,7 +570,9 @@ int DrawX121SMCStrategyConditions(
XCBaseObject *objects[];
int objectsCount = drawer.DrawPriceZone(
conditions.decisionZones,
objects //
objects,
conditions.signalDir,
drawOnlyPriceZonesBoundary //
);
if (IsValidSize(objectsCount))
{