diff --git a/Experts/x-saherelm.x-121.smc.ea.mq5 b/Experts/x-saherelm.x-121.smc.ea.mq5 index 6770a373..a8177bdc 100644 --- a/Experts/x-saherelm.x-121.smc.ea.mq5 +++ b/Experts/x-saherelm.x-121.smc.ea.mq5 @@ -50,7 +50,7 @@ input int eaMaxAllowedLongs = 5; // Max Allowed Long input int eaMaxAllowedShorts = 5; // Max Allowed Short Signals input bool eaUseMaxAllowedSignalsPerSymbol = true; // Use Max Allowed Signal Types Per Symbol input double eaLastPositionProfitForAcceptNextInPoint = 30; // Last Position Profit In Points for Accept new Signal -input int eaDelaysBetweenTwoSignalsInBar = 10; // Delay between two Signals in Bars +input int eaDelaysBetweenTwoSignalsInBar = 100; // Delay between two Signals in Bars input double eaMaxAllowedSpread = 25; // Max Allowed Spread for Signalling input int eaMinRequiredVerificationForSpreadPass = 20; // Minimum Spread Verification for Signalling diff --git a/X121SMCEA/Classes/x-121.smc.x-tradehandler.class.mq5 b/X121SMCEA/Classes/x-121.smc.x-tradehandler.class.mq5 index ab3f42cf..4964121e 100644 --- a/X121SMCEA/Classes/x-121.smc.x-tradehandler.class.mq5 +++ b/X121SMCEA/Classes/x-121.smc.x-tradehandler.class.mq5 @@ -25,8 +25,8 @@ // #include "../../Classes/x-saherelm.x-alert.class.mq5" #include "../../Classes/x-saherelm.x-bar.analyser.class.mq5" -#include "../../Classes/x-saherelm.x-trade.class.mq5" #include "../../Classes/x-saherelm.x-poi.drawer.class.mq5" +#include "../../Classes/x-saherelm.x-trade.class.mq5" // // Definitions ... @@ -3555,6 +3555,9 @@ class XC121SMCTradeHandler : public XCBaseAlert ); } + // + ResetProtections(); + // string message = "Hedge (" + ToString(count) + ") Positions By: " + ToString(profitSummary) + " Successfully ..."; @@ -4071,6 +4074,14 @@ class XC121SMCTradeHandler : public XCBaseAlert return result; } + // + void ResetProtections() + { + // + ResumePausedSymbols(); + Clean(mLastExecutedSignals); + } + // // End of XC121SMCTradeHandler Class ... }; diff --git a/X121SMCEA/Signals/x-121.smc.xtwpv.signal.lib.mq5 b/X121SMCEA/Signals/x-121.smc.xtwpv.signal.lib.mq5 index b73b9f57..075d3e4a 100644 --- a/X121SMCEA/Signals/x-121.smc.xtwpv.signal.lib.mq5 +++ b/X121SMCEA/Signals/x-121.smc.xtwpv.signal.lib.mq5 @@ -1806,7 +1806,7 @@ bool DetectX121SMCXTWPVSiganlTrigger( // conditions.sl = sl; - conditions.target = target; + conditions.target = 0; // target; conditions.triggerTime = cTime; conditions.type = isBullish ? X_POSITION_TYPE_LONG diff --git a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 index 5f605c39..7d5d00b8 100644 --- a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 +++ b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 @@ -497,77 +497,77 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy // // Handle Required Drawings ... - // bool hasPivot = mXTWPVConditions.HasPivot(); - // bool hasPriceInsideZone = mXTWPVConditions.HasPriceInsideZones(); - // bool hasConsolidationZone = mXTWPVConditions.HasConsolidationZone(); - // bool canDraw = hasPivot || - // hasPriceInsideZone || - // hasConsolidationZone; - // if (canDraw) - // { - // // - // ClearDraws(); + bool hasPivot = mXTWPVConditions.HasPivot(); + bool hasPriceInsideZone = mXTWPVConditions.HasPriceInsideZones(); + bool hasConsolidationZone = mXTWPVConditions.HasConsolidationZone(); + bool canDraw = hasPivot || + hasPriceInsideZone || + hasConsolidationZone; + if (canDraw) + { + // + ClearDraws(); - // // - // // Draw Consolidation Zone ... - // if (hasConsolidationZone) - // { - // // - // XCConsolidationZoneObject *iObj; - // bool isCreated = mPOIDrawer.CreateConsolidationZone( - // mXTWPVConditions.consolidationZone, - // iObj // - // ); - // if (isCreated) - // { - // AddObjectIfNotExists(iObj); - // } - // } + // + // Draw Consolidation Zone ... + if (hasConsolidationZone) + { + // + XCConsolidationZoneObject *iObj; + bool isCreated = mPOIDrawer.CreateConsolidationZone( + mXTWPVConditions.consolidationZone, + iObj // + ); + if (isCreated) + { + AddObjectIfNotExists(iObj); + } + } - // // - // // Draw Pivot Zone ... - // if (hasPivot) - // { - // // - // XCBaseObject *drawnObjects[]; - // int drawnObjectsCount = DrawXTWPVPivotZone( - // mXTWPVConditions, - // mPOIDrawer, - // drawnObjects, - // false, // Draw State ... - // false, // Draw Ticks Zone ... - // true, // Ignore SwingHighs ... - // true, // Ignore SwingLows ... - // true, // Ignore SupportZones ... - // true, // Ignore ResistanceZones ... - // true, // Ignore SupplyZones ... - // true, // Ignore DemandZones ... - // true, // Ignore BullishOrderBlocks ... - // true, // Ignore BearishOrderBlocks ... - // true, // Ignore BullishFairValueGaps ... - // true, // Ignore BearishFairValueGaps ... - // true, // Ignore BullishRejectionBars ... - // true, // Ignore BearishRejectionBars ... - // true, // Ignore BullishMomentumBars ... - // true // Ignore BearishMomentumBars ... - // ); - // AddObjectsIfNotExists(drawnObjects); - // } + // + // Draw Pivot Zone ... + if (hasPivot) + { + // + XCBaseObject *drawnObjects[]; + int drawnObjectsCount = DrawXTWPVPivotZone( + mXTWPVConditions, + mPOIDrawer, + drawnObjects, + false, // Draw State ... + false, // Draw Ticks Zone ... + true, // Ignore SwingHighs ... + true, // Ignore SwingLows ... + true, // Ignore SupportZones ... + true, // Ignore ResistanceZones ... + true, // Ignore SupplyZones ... + true, // Ignore DemandZones ... + true, // Ignore BullishOrderBlocks ... + true, // Ignore BearishOrderBlocks ... + true, // Ignore BullishFairValueGaps ... + true, // Ignore BearishFairValueGaps ... + true, // Ignore BullishRejectionBars ... + true, // Ignore BearishRejectionBars ... + true, // Ignore BullishMomentumBars ... + true // Ignore BearishMomentumBars ... + ); + AddObjectsIfNotExists(drawnObjects); + } - // // - // // Draw Price Inside Zones ... - // if (hasPriceInsideZone) - // { - // // - // XCBaseObject *drawnObjects[]; - // int drawnObjectsCount = DrawTWPVPriceInsideZones( - // mXTWPVConditions, - // mPOIDrawer, - // drawnObjects // - // ); - // AddObjectsIfNotExists(drawnObjects); - // } - // } + // + // Draw Price Inside Zones ... + if (hasPriceInsideZone) + { + // + XCBaseObject *drawnObjects[]; + int drawnObjectsCount = DrawTWPVPriceInsideZones( + mXTWPVConditions, + mPOIDrawer, + drawnObjects // + ); + AddObjectsIfNotExists(drawnObjects); + } + } // result = isSetuped;