From c7b34033e59c3fb67d57b883cc5c0d20bd8ee436 Mon Sep 17 00:00:00 2001 From: Naji El Chemaly Date: Wed, 10 Jun 2026 17:51:08 +0300 Subject: [PATCH] fix: Removed hard ORB breakout suppression by day bias, Kept bias logging for traceability, Updated bias documentation comment to match behavior --- NANDR_ORB_OB_EA.mq5 | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/NANDR_ORB_OB_EA.mq5 b/NANDR_ORB_OB_EA.mq5 index c6d97f9..8267ee3 100644 --- a/NANDR_ORB_OB_EA.mq5 +++ b/NANDR_ORB_OB_EA.mq5 @@ -248,8 +248,8 @@ int g_BullOBCount = 0; int g_BearOBCount = 0; // Day bias: direction of the first confirmed ORB breakout of the day (0=none, 1=bull, -1=bear). -// When InpUseSessionBiasFilter=true, subsequent session breakouts and all OB entries that -// contradict this bias are suppressed, preventing counter-trend trades. +// InpUseSessionBiasFilter keeps bias context for diagnostics and selective filters. +// ORB breakout detection is not suppressed by bias; OB retest entries may still be filtered. int g_GlobalBiasDir = 0; // Tracks tickets that have already had partial close executed so it only fires once per position @@ -662,12 +662,11 @@ void DetectBreakouts() if(bullBO) { - // Bias filter: suppress if day bias is already bearish + // Bias filter note: do not suppress ORB breakout detection. if(InpUseSessionBiasFilter && g_GlobalBiasDir == -1) { - PrintFormat("NANDR EA: [%s] Bullish breakout SUPPRESSED — day bias is BEARISH", + PrintFormat("NANDR EA: [%s] Bullish breakout detected while day bias is BEARISH (not suppressed)", g_Sessions[s].name); - continue; } g_Sessions[s].breakoutDir = 1; g_Sessions[s].inBreakout = true; @@ -680,12 +679,11 @@ void DetectBreakouts() } else if(bearBO) { - // Bias filter: suppress if day bias is already bullish + // Bias filter note: do not suppress ORB breakout detection. if(InpUseSessionBiasFilter && g_GlobalBiasDir == 1) { - PrintFormat("NANDR EA: [%s] Bearish breakout SUPPRESSED — day bias is BULLISH", + PrintFormat("NANDR EA: [%s] Bearish breakout detected while day bias is BULLISH (not suppressed)", g_Sessions[s].name); - continue; } g_Sessions[s].breakoutDir = -1; g_Sessions[s].inBreakout = true; @@ -1298,15 +1296,15 @@ void CheckRetestEntriesTick() if(g_Sessions[s].breakoutDir == 1) // Bullish { - // Continuation retest: bullish breakout remains active and wick retests level. - // Use live ask filter for confirmation instead of flipping direction intrabar. - if(l_cur <= orbHigh && ask >= orbHigh - tol) + // Continuation retest: breakout direction is already confirmed. + // Trigger on wick-touch of the session level. + if(l_cur <= orbHigh) { orbLevel = orbHigh; dir = 1; } // Mid retest continuation. - else if(l_cur <= orbMid && ask >= orbMid - tol) + else if(l_cur <= orbMid) { orbLevel = orbMid; dir = 1; @@ -1314,15 +1312,15 @@ void CheckRetestEntriesTick() } else if(g_Sessions[s].breakoutDir == -1) // Bearish { - // Continuation retest: bearish breakout remains active and wick retests level. - // Use live bid filter for confirmation instead of flipping direction intrabar. - if(h_cur >= orbLow && bid <= orbLow + tol) + // Continuation retest: breakout direction is already confirmed. + // Trigger on wick-touch of the session level. + if(h_cur >= orbLow) { orbLevel = orbLow; dir = -1; } // Mid retest continuation. - else if(h_cur >= orbMid && bid <= orbMid + tol) + else if(h_cur >= orbMid) { orbLevel = orbMid; dir = -1;