From 94341f9ad5018272e5d59da8170a55eaa99ec404 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Wed, 5 Mar 2025 14:40:12 +0330 Subject: [PATCH] last ... --- .../Signals/x-121.smc.xwz.signal.class.mq5 | 48 ++--- .../Signals/x-121.smc.xwz.signal.lib.mq5 | 176 +++++++++--------- .../Strategy/x-121.smc.strategy.class.mq5 | 6 +- 3 files changed, 118 insertions(+), 112 deletions(-) diff --git a/X121SMCEA/Signals/x-121.smc.xwz.signal.class.mq5 b/X121SMCEA/Signals/x-121.smc.xwz.signal.class.mq5 index ed56914c..265ce517 100644 --- a/X121SMCEA/Signals/x-121.smc.xwz.signal.class.mq5 +++ b/X121SMCEA/Signals/x-121.smc.xwz.signal.class.mq5 @@ -484,27 +484,27 @@ class XCX121SMCXWZSignalDetector : public XCBase signalBoxDir = signalBox.dir; provider = X121SMC_XWZ_PROVIDER_ACTIVATED_ZONE; - // - int idx = FindIndex( - activatedZone, - workingZone.waitingZones // - ); - bool has = IsValidIndex(idx); - if (has) - { - // - ArrayRemove( - workingZone.waitingZones, - idx, - 1 // - ); + // // + // int idx = FindIndex( + // activatedZone, + // workingZone.waitingZones // + // ); + // bool has = IsValidIndex(idx); + // if (has) + // { + // // + // ArrayRemove( + // workingZone.waitingZones, + // idx, + // 1 // + // ); - // - AddRef( - activatedZone, - workingZone.unavailableZones // - ); - } + // // + // AddRef( + // activatedZone, + // workingZone.unavailableZones // + // ); + // } } } @@ -914,7 +914,8 @@ class XCX121SMCXWZSignalDetector : public XCBase // // Summarize Results ... - result = hasPriority && + result = false && + hasPriority && hasSignalBox && hasRewardAmount; @@ -961,6 +962,11 @@ class XCX121SMCXWZSignalDetector : public XCBase true // Draw Waiting Zones Box Area ... // ); + + // + if (hasSignalBox) { + Print("Has Signal Box ..."); + } } // diff --git a/X121SMCEA/Signals/x-121.smc.xwz.signal.lib.mq5 b/X121SMCEA/Signals/x-121.smc.xwz.signal.lib.mq5 index 3f0a9a2a..17222468 100644 --- a/X121SMCEA/Signals/x-121.smc.xwz.signal.lib.mq5 +++ b/X121SMCEA/Signals/x-121.smc.xwz.signal.lib.mq5 @@ -494,93 +494,93 @@ struct X121SMCStrategyXWZWorkingZone // // Detect SupDem FVG ... - if (!result) - { - // - result = hasNewFairValueGap && - (hasNewSupply || - hasNewDemand); - if (result) - { - // - // Converts Supply or Demand Zone to OrderBlock ... - XOHCL bar; - ob = new XCOrderBlock(); - if (hasNewSupply) - { - // - has = supply.FillBar(bar); - if (has) - { - // - has = ob.Init( - bar, - X_DIRECTION_BEARISH // - ); - if (has) - { - // - ob.Upper(supply.Upper()); - ob.Lower(supply.Lower()); - } - } - } - else if (hasNewDemand) - { - // - has = demand.FillBar(bar); - if (has) - { - // - has = ob.Init( - bar, - X_DIRECTION_BULLISH // - ); - if (has) - { - // - ob.Upper(demand.Upper()); - ob.Lower(demand.Lower()); - } - } - } + // if (!result) + // { + // // + // result = hasNewFairValueGap && + // (hasNewSupply || + // hasNewDemand); + // if (result) + // { + // // + // // Converts Supply or Demand Zone to OrderBlock ... + // XOHCL bar; + // ob = new XCOrderBlock(); + // if (hasNewSupply) + // { + // // + // has = supply.FillBar(bar); + // if (has) + // { + // // + // has = ob.Init( + // bar, + // X_DIRECTION_BEARISH // + // ); + // if (has) + // { + // // + // ob.Upper(supply.Upper()); + // ob.Lower(supply.Lower()); + // } + // } + // } + // else if (hasNewDemand) + // { + // // + // has = demand.FillBar(bar); + // if (has) + // { + // // + // has = ob.Init( + // bar, + // X_DIRECTION_BULLISH // + // ); + // if (has) + // { + // // + // ob.Upper(demand.Upper()); + // ob.Lower(demand.Lower()); + // } + // } + // } - // - obFVG.ob = ob; - obFVG.AddFVG(fvg); + // // + // obFVG.ob = ob; + // obFVG.AddFVG(fvg); - // - has = obFVG.IsValid(); - if (has) - { - // - // Check Item Is not Exists ... - idx = FindIndex( - obFVG, - waitingZones // - ); - has = !IsValidIndex(idx); - if (has) - { - // - // New Waiting Zone ... - AddRef( - obFVG, - waitingZones // - ); - } - else - { - // - // Update Exists Waiting Zone ... - waitingZones[idx].AddFVG(fvg); - } - } + // // + // has = obFVG.IsValid(); + // if (has) + // { + // // + // // Check Item Is not Exists ... + // idx = FindIndex( + // obFVG, + // waitingZones // + // ); + // has = !IsValidIndex(idx); + // if (has) + // { + // // + // // New Waiting Zone ... + // AddRef( + // obFVG, + // waitingZones // + // ); + // } + // else + // { + // // + // // Update Exists Waiting Zone ... + // waitingZones[idx].AddFVG(fvg); + // } + // } - // - bar.Clean(); - } - } + // // + // bar.Clean(); + // } + // } // result = HasWaitingZones(); @@ -752,8 +752,8 @@ struct X121SMCStrategyXWZWorkingZone zone, waitingZones // ); - result = !IsValidIndex(idx); - if (!result) + result = IsValidIndex(idx); + if (result) { return result; } @@ -764,8 +764,8 @@ struct X121SMCStrategyXWZWorkingZone zone, unavailableZones // ); - result = !IsValidIndex(idx); - if (!result) + result = IsValidIndex(idx); + if (result) { return result; } diff --git a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 index 83a085b2..c028f6f1 100644 --- a/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 +++ b/X121SMCEA/Strategy/x-121.smc.strategy.class.mq5 @@ -811,9 +811,9 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy // // X3MA ... - x121Inputs.x3maInputs.showX3MaFast = showAll || false; - x121Inputs.x3maInputs.showX3MaMid = showAll || false; - x121Inputs.x3maInputs.showX3MaSlow = showAll || false; + x121Inputs.x3maInputs.showX3MaFast = showAll || true; + x121Inputs.x3maInputs.showX3MaMid = showAll || true; + x121Inputs.x3maInputs.showX3MaSlow = showAll || true; // // Initialize Cycle Helpers ...