last ...
This commit is contained in:
@@ -3278,7 +3278,11 @@ class XC121SMCTradeHandler : public XCBaseAlert
|
||||
DrawX121SMCStrategyConditions(
|
||||
conditions,
|
||||
conditionsObjects,
|
||||
mDrawer //
|
||||
mDrawer,
|
||||
true,
|
||||
true, // Analyse Price Zones ...
|
||||
true, // Decision Zone ...
|
||||
true // Only Box ...
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ...
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user