Page 2 of 2
Re: Failed London ORB: when I fade the first break instead of chasing
Posted: Wed Sep 23, 2026 10:31 pm
by PTScalper
2. New Global Variable
Add this with your other global variables (ORB_High, ORB_Low, etc.) so the EA only calculates the Asia trend once per day, rather than on every single tick.
(Don't forget to add AsiaWasTrend = false; inside your existing if(TimeDay(TimeCurrent()) != TimeDay(currentDay)) daily reset block!)
Re: Failed London ORB: when I fade the first break instead of chasing
Posted: Wed Sep 23, 2026 10:31 pm
by PTScalper
3. The Asia Trend Helper Function
Add this function at the bottom of your EA. It calculates the total range and the net displacement of the Asian session to determine if it was directional.
Code: Select all
//+------------------------------------------------------------------+
//| Check if the Asia session was a one-sided trend |
//+------------------------------------------------------------------+
bool IsAsiaTrendDay(datetime asiaStart, datetime asiaEnd)
{
if(!UseAsiaTrendFilter) return false;
int startBar = iBarShift(Symbol(), PERIOD_M5, asiaStart, false);
int endBar = iBarShift(Symbol(), PERIOD_M5, asiaEnd, false);
if(startBar < 0 || endBar < 0 || startBar <= endBar) return false;
double asiaOpen = iOpen(Symbol(), PERIOD_M5, startBar);
double asiaClose = iClose(Symbol(), PERIOD_M5, endBar);
double asiaHigh = 0.0;
double asiaLow = 99999.0;
// Find the High and Low of the Asian session
for(int i = endBar; i <= startBar; i++)
{
if(High[i] > asiaHigh) asiaHigh = High[i];
if(Low[i] < asiaLow) asiaLow = Low[i];
}
// Adjust for 3/5 digit brokers to ensure pip input works correctly
double pointMultiplier = (Digits == 3 || Digits == 5) ? 10.0 : 1.0;
double minTrendPoints = AsiaTrendMinPips * pointMultiplier * Point;
double totalRange = asiaHigh - asiaLow;
double netMove = MathAbs(asiaClose - asiaOpen);
// A trend day means price moved far AND closed near the extreme (e.g., net move is > 70% of total range)
if(netMove >= minTrendPoints && netMove >= (totalRange * 0.70))
{
Print("Fade Vetoed: Asia was a directional trend. Net Move: ", netMove / pointMultiplier / Point, " pips.");
return true;
}
return false;
}
Re: Failed London ORB: when I fade the first break instead of chasing
Posted: Wed Sep 23, 2026 10:32 pm
by PTScalper
4. Integration into OnTick()
Because the Asian session is fully closed by the time the ORB forms, we should evaluate the Asia filter exactly onceāat the exact moment the ORB finishes forming.
Update step 4 in your existing OnTick() function to calculate this:
Code: Select all
// 4. Mark ORB as formed once the end time passes and evaluate Asia
if(TimeCurrent() > endTime && !ORB_Formed && ORB_High > 0)
{
ORB_Formed = true;
datetime asiaStart = StringToTime(TimeToStr(TimeCurrent(), TIME_DATE) + " " + AsiaStart_Time);
datetime asiaEnd = StringToTime(TimeToStr(TimeCurrent(), TIME_DATE) + " " + AsiaEnd_Time);
// Calculate once for the day
AsiaWasTrend = IsAsiaTrendDay(asiaStart, asiaEnd);
}
Re: Failed London ORB: when I fade the first break instead of chasing
Posted: Wed Sep 23, 2026 10:32 pm
by PTScalper
Finally, add && !AsiaWasTrend to your execution logic blocks in Step 5:
Code: Select all
// Trigger: Candle closes fully back inside the ORB (Short Example)
if(Close[1] < ORB_High && Open[1] < ORB_High && Bars_Outside <= MaxBarsOutside && Broke_High && !AsiaWasTrend)
{
// ... execute trade
By placing the check inside the ORB completion block, your EA cleanly handles the math once per day. If Asia prints a 40-pip slow grind with a strong close at the highs, AsiaWasTrend becomes true, and the EA will ignore all M5 fakeouts for the rest of the day, leaving you flat while the true breakout trend (likely) continues.