Page 1 of 1

Avoiding look-ahead bias in M1 research

Posted: Tue Oct 27, 2026 9:18 am
by FXS London Scalper
Look-ahead bias is the classic backtest killer: using information that wouldn't have been available at the moment of the decision. On M1 strategies it creeps in through some quiet doors.

Examples I've caught in my own code:
  • Using the current bar's close for a signal, then entering at the same bar's open. Should be: signal on bar close, entry on the next bar.
  • Daily high/low used during the day, when only the high/low so far was known.
  • Indicators that repaint, like some zigzag or fractal versions, which change past values.
  • Session levels in the wrong time zone. An "Asia range" that included an hour of London data because of a DST offset.
  • Data cleaning that peeks. Removing outliers based on full-sample statistics.
Checks I now do:
  1. Run the strategy bar by bar in a simulated live mode and compare signals with the vectorised backtest. They must match exactly.
  2. Shift all signals one bar later. If performance collapses, check whether you were relying on information you couldn't have had.
  3. Print timestamps of all inputs to a signal for a few random trades and check by hand.
Which look-ahead bugs have you found in your research? Some of them are really sneaky.