Blog / Strategy
Strategy

Opening Balance Reversion

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

Opening Balance Reversion is an intraday, time-anchored mean-reversion strategy that fades failed breakouts of the session's opening range using an Average True Range (ATR) volatility filter. The core idea comes from auction market theory: during the first part of a trading session, the market discovers an initial "value area" — a high and a low that together form what traders call the opening balance. The midpoint of that balance tends to act as a magnet for the rest of the session, so when price pokes above or below an edge and is then rejected back inside, the strategy signals a fade back toward the centre.

The strategy is built for range-bound or balanced intraday conditions — the sort of quieter, two-sided session where price probes the extremes of the early range and then reverts, rather than trending away in one direction all day. To avoid fighting genuine trend days, it uses an ATR-based "runaway" filter: if a poke beyond the edge is larger than a configurable multiple of ATR (a measure of recent volatility, or how far price typically moves per bar), the setup is ignored entirely. This is a deliberate attempt to stay out of the market when the auction is not balanced.

As a learning tool, Opening Balance Reversion is well suited to traders who want to study session-based mean reversion, opening-range concepts, and volatility-normalized risk placement. It demonstrates how a systematic strategy can encode ideas like time-of-day anchoring, rejection candles, and break-even trailing into precise, repeatable rules. It is not a shortcut of any kind — it is a structured example of how one style of intraday logic can be expressed in code and studied on historical data.

How It Works

The strategy operates on completed bars only (no repainting) and manages one position at a time. Here is the full logic in plain English:

Session anchoring and the opening balance

Entry conditions (short — fading the top)

The strategy signals a short when all of the following are true:

Entry conditions (long — reclaiming the bottom)

The mirror-image logic applies for longs: the bar's low reaches or dips below the opening-balance low but by no more than the maximum poke, the bar closes back inside (above the low), and the bar is bullish. The strategy takes at most one long and one short per session.

Stop-loss logic

Take-profit logic

Break-even trail

opening balance reversion MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
SessionStartHour 7 0 23 UTC hour at which a fresh session (and its opening balance) begins.
OpeningRangeBars 4 1 16 Number of bars from the start hour that form the opening-balance box.
SessionEndHour 18 1 23 UTC hour to stop taking trades and flatten all positions.
AtrPeriod 14 5 30 Lookback period for the ATR volatility measure.
MinRangeAtrMult 1.00 0.20 4.00 Opening-balance width must be at least this many ATRs to be worth fading.
MaxPokeAtrMult 0.75 0.10 2.50 Largest poke beyond the edge (in ATRs) still treated as a rejection, not a trend break.
TargetFraction 0.60 0.30 1.00 Take-profit as a fraction of the balance width, measured back in from the poked edge.
StopAtrMult 0.80 0.30 3.00 Stop distance beyond the rejected extreme, in ATRs.
BreakevenAtr 0.80 0.00 3.00 Move the stop to break-even once price travels this many ATRs in favour (0 = off).
Lots 0.10 0.01 1.00 Order volume in lots.
opening balance reversion MT5 EA — MQL5 source code

Recommended Chart Settings

Opening Balance Reversion was designed for intraday forex and works on whatever timeframe is selected at backtest time. The strategy notes suggest liquid major pairs such as EURUSD or GBPUSD on the M15 (15-minute) timeframe, where the default OpeningRangeBars of 4 corresponds to the first hour of the session. The default session window of 07:00–18:00 UTC roughly spans the London and early New York hours, when these pairs are most active.

Because the strategy is anchored to UTC hours, always confirm how your broker's server time relates to UTC before adjusting SessionStartHour and SessionEndHour. Remember that results will vary considerably across different pairs, timeframes, brokers, and market conditions — the defaults are a starting point for study, not a prescription.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. The strategy is disciplined and clearly scoped. It only trades within a defined session window, never holds overnight, and caps itself at one attempt per side per session — all of which limit overtrading. The ATR-based runaway filter is a thoughtful attempt to avoid fading real trends, and the volatility-normalized stops and targets adapt position risk to current market conditions rather than using fixed pip distances. Its rules are fully mechanical, which makes it a clean example for studying how mean-reversion logic behaves on historical data.

Known limitations. Mean-reversion strategies share a well-documented weakness: they perform poorly on strong trend days, when price pushes through an "edge" and simply keeps going. The MaxPokeAtrMult filter helps, but no filter is perfect, and a series of trend days can produce a run of stop-outs. The opening-range concept is also sensitive to session timing — a poorly chosen SessionStartHour for a given market may capture the wrong part of the day's auction. Finally, like all opening-range systems, its behaviour depends heavily on the chosen timeframe and the number of bars used to build the balance.

Where it may underperform. Expect weaker behaviour during major news releases, low-liquidity periods, and sustained directional trends. Wide spreads and slippage on smaller or more exotic pairs can also erode the relatively modest per-trade targets this strategy aims for. Treat it as one component in a broader study of intraday behaviour rather than a standalone solution.

Risk Management Tips

Sound risk management matters far more than any single strategy. As you study this or any EA, keep these general principles in mind:

Risk management is not an afterthought — it is the foundation on which any systematic approach should be built.

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog