From 093e868ba6dc4d66450fd09a9a3b06c76ff20bf0 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Sun, 27 Oct 2024 15:41:42 +0330 Subject: [PATCH] Last Works on SMC ... --- .../Strategy/x-121.smc.strategy.class.mq5 | 47 +++++++++++++++---- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 index 21f076fa..a0736902 100644 --- a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 +++ b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 @@ -468,6 +468,7 @@ class XCX121SMCStrategy : public XSCBaseAlert // // Loop through Conditions for Filter Based on POIs ... + int removeIDX = -1; for (int i = 0; i < conditionsCount; i++) { // @@ -495,17 +496,25 @@ class XCX121SMCStrategy : public XSCBaseAlert conditions.bullishOrderBlock.IsValid()); // - bool hasLongConditions = isSoImportantLong; - // || - // isImportantLong || - // isRiskyLong; + bool hasLongConditions = isSoImportantLong || + isImportantLong || + isRiskyLong; // if (hasLongConditions) { // + // Find Trigger for Input Positions ... + // - [] Breakout; + // - [] Engulf; + // - [] Rejection Bar; + // - [] Momentum Bar; + + // + removeIDX = i; DrawConditions(conditions); Print("hasLongConditions"); + // break; } // @@ -530,22 +539,42 @@ class XCX121SMCStrategy : public XSCBaseAlert !conditions.bearishOrderBlock.IsValid()); // - bool hasShortConditions = isSoImportantShort; - // || - // isImportantShort || - // isRiskyShort; + bool hasShortConditions = isSoImportantShort || + isImportantShort || + isRiskyShort; // if (hasShortConditions) { // + // Find Trigger for Input Positions ... + // - [] Breakout; + // - [] Engulf; + // - [] Rejection Bar; + // - [] Momentum Bar; + + // + removeIDX = i; DrawConditions(conditions); Print("hasShortConditions"); + // break; } // } + // + // Rmove Signal Condition ... + if (result && + IsValidIndex(removeIDX)) + { + // + ArrayRemove( + mConditions, + removeIDX, + 1); + } + // return result; } @@ -1841,7 +1870,7 @@ class XCX121SMCStrategy : public XSCBaseAlert /** * Draw Specific Condition ... * - * @param conditions: Argument 1 + * @param conditions: Argument 1 */ void DrawConditions(X121SMCStrategyConditions &conditions) {