fix: Removed hard ORB breakout suppression by day bias, Kept bias logging for traceability, Updated bias documentation comment to match behavior

This commit is contained in:
Naji El Chemaly
2026-06-10 17:51:08 +03:00
parent 7182736a57
commit c7b34033e5
+14 -16
View File
@@ -248,8 +248,8 @@ int g_BullOBCount = 0;
int g_BearOBCount = 0; int g_BearOBCount = 0;
// Day bias: direction of the first confirmed ORB breakout of the day (0=none, 1=bull, -1=bear). // 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 // InpUseSessionBiasFilter keeps bias context for diagnostics and selective filters.
// contradict this bias are suppressed, preventing counter-trend trades. // ORB breakout detection is not suppressed by bias; OB retest entries may still be filtered.
int g_GlobalBiasDir = 0; int g_GlobalBiasDir = 0;
// Tracks tickets that have already had partial close executed so it only fires once per position // Tracks tickets that have already had partial close executed so it only fires once per position
@@ -662,12 +662,11 @@ void DetectBreakouts()
if(bullBO) 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) 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); g_Sessions[s].name);
continue;
} }
g_Sessions[s].breakoutDir = 1; g_Sessions[s].breakoutDir = 1;
g_Sessions[s].inBreakout = true; g_Sessions[s].inBreakout = true;
@@ -680,12 +679,11 @@ void DetectBreakouts()
} }
else if(bearBO) 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) 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); g_Sessions[s].name);
continue;
} }
g_Sessions[s].breakoutDir = -1; g_Sessions[s].breakoutDir = -1;
g_Sessions[s].inBreakout = true; g_Sessions[s].inBreakout = true;
@@ -1298,15 +1296,15 @@ void CheckRetestEntriesTick()
if(g_Sessions[s].breakoutDir == 1) // Bullish if(g_Sessions[s].breakoutDir == 1) // Bullish
{ {
// Continuation retest: bullish breakout remains active and wick retests level. // Continuation retest: breakout direction is already confirmed.
// Use live ask filter for confirmation instead of flipping direction intrabar. // Trigger on wick-touch of the session level.
if(l_cur <= orbHigh && ask >= orbHigh - tol) if(l_cur <= orbHigh)
{ {
orbLevel = orbHigh; orbLevel = orbHigh;
dir = 1; dir = 1;
} }
// Mid retest continuation. // Mid retest continuation.
else if(l_cur <= orbMid && ask >= orbMid - tol) else if(l_cur <= orbMid)
{ {
orbLevel = orbMid; orbLevel = orbMid;
dir = 1; dir = 1;
@@ -1314,15 +1312,15 @@ void CheckRetestEntriesTick()
} }
else if(g_Sessions[s].breakoutDir == -1) // Bearish else if(g_Sessions[s].breakoutDir == -1) // Bearish
{ {
// Continuation retest: bearish breakout remains active and wick retests level. // Continuation retest: breakout direction is already confirmed.
// Use live bid filter for confirmation instead of flipping direction intrabar. // Trigger on wick-touch of the session level.
if(h_cur >= orbLow && bid <= orbLow + tol) if(h_cur >= orbLow)
{ {
orbLevel = orbLow; orbLevel = orbLow;
dir = -1; dir = -1;
} }
// Mid retest continuation. // Mid retest continuation.
else if(h_cur >= orbMid && bid <= orbMid + tol) else if(h_cur >= orbMid)
{ {
orbLevel = orbMid; orbLevel = orbMid;
dir = -1; dir = -1;