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?
The Previous Day Range Breakout strategy is a breakout trading system built around one of the most widely followed reference points in intraday markets: yesterday's high and yesterday's low. These two levels bracket the entire prior trading session, so they act as a natural map of where the market last found agreement between buyers and sellers. A move that decisively pushes beyond either boundary is treated as a signal that price has left that zone of balance and may be trending into fresh territory.
To measure how far price should travel before a breakout is considered valid — and to size its stops and targets — the strategy uses the Average True Range (ATR), an indicator that quantifies recent volatility. Because every distance in the system is expressed as a multiple of ATR rather than a fixed number of points, the logic adapts automatically to different symbols and different volatility regimes without any hard-coded values.
This strategy is best understood as a learning tool for anyone studying how price reacts around obvious, well-watched levels. It is a clean, mirror-image example of directional breakout logic: the long rules and short rules are exact reflections of one another. It is not a shortcut to any particular outcome, and it is presented here so you can study its structure, test it responsibly, and understand both what it is trying to capture and where it can struggle.
How It Works
The strategy tracks the trading day directly from the primary chart's own calendar date — it never reads a second timeframe. Each newly closed bar extends the current day's running high and low. When the calendar date rolls over to a new day, the day that just finished is "frozen" and its high and low become the breakout rails for the new session.
Here is how the strategy operates, step by step:
- Building the range: As each bar closes, the strategy updates today's highest high and lowest low. When a new UTC calendar day begins, yesterday's completed high and low are locked in as
PrevDayHighandPrevDayLow. - Confirmation buffer: To avoid reacting to a marginal poke that merely tags a level and slips back inside, the strategy adds a buffer — a fraction of ATR — beyond each rail. Price must close clearly past the level plus this buffer.
- Long entry signal: When a bar closes above
PrevDayHigh + buffer, the strategy signals an upside breakout and opens a buy at the current ask price. - Short entry signal: When a bar closes below
PrevDayLow - buffer, the strategy signals a downside breakout and opens a sell at the current bid price. - Stop-loss logic: The stop is placed a distance of
AtrStopMult × ATRaway from entry — below entry for longs, above entry for shorts. Because it is ATR-scaled, the stop widens in volatile conditions and tightens in quiet ones. - Take-profit logic: The target is set at
RewardRatio ×the stop distance. With the default reward ratio of 1.8, the strategy aims for a reward that is 1.8 times the amount it risks on each trade. - One position at a time: Only a single position per Magic number is held at once. The strategy will not stack new trades on top of an open one.
- Re-entry cap: Each side (long and short) is limited to
MaxTradesPerDayentries per session, so a choppy day that repeatedly pokes a level cannot spawn an endless string of re-entries. - Spread filter: If the current spread is wider than
MaxSpreadPoints, the strategy skips the entry entirely to avoid trading in poor execution conditions.
Every signal is evaluated once per newly closed bar, using the bar that just finished as the decision bar. This "close beyond the level" requirement is what separates a genuine breakout signal from a brief intrabar spike.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| AtrPeriod | 14 | 5 | 50 | Number of bars in the ATR calculation used for the breakout buffer and for stop/target sizing. |
| AtrStopMult | 1.5 | 0.5 | 5.0 | Stop-loss distance beyond entry, expressed in ATR multiples. Larger values give the trade more room. |
| RewardRatio | 1.8 | 0.5 | 5.0 | Take-profit distance as a multiple of the ATR stop distance. 1.8 targets a reward 1.8× the risk. |
| BreakoutBufferAtr | 0.10 | 0.00 | 1.00 | Confirmation buffer beyond the previous-day level, as a fraction of ATR. Filters out marginal pokes. |
| MaxTradesPerDay | 1 | 1 | 5 | Maximum entries per side (long and short) per session, guarding against re-entry churn. |
| MaxSpreadPoints | 60 | 0 | 400 | Skips new entries when the current spread in points is wider than this value. |
| Lots | 0.10 | 0.01 | 1.00 | Base trade volume, normalised to the symbol's volume step and limits. |
| Magic | 5307 | 0 | 9,999,999 | Unique identifier so the EA manages only its own positions. |

Recommended Chart Settings
The Previous Day Range Breakout strategy was designed for indices and FX majors — for example US30, EURUSD, or XAUUSD (gold) — on M15 or M30 timeframes. These are the classic home of prior-day-level breakout trading, where yesterday's high and low are watched closely by a large number of participants.
The intermediate timeframe matters: it is granular enough to produce a clean breakout close soon after a level is broken, yet slow enough to filter out much of the noise seen on very short charts. Note that results will vary considerably across different symbols, brokers, and market conditions, so any timeframe or symbol you choose should be studied on its own merits rather than assumed to behave identically to another.
How to Install on MetaTrader 5
- Download the
.ex5file from the link below. - Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Like every breakout approach, this strategy has clear strengths and equally clear limitations, and understanding both is part of studying it properly.
Strengths. The logic is transparent and symmetrical — the long and short rules are exact mirrors, which makes the strategy easy to reason about. Because it references yesterday's high and low, it anchors to levels that many traders monitor, so breakouts can coincide with genuine shifts in participation. The ATR-based buffers, stops, and targets mean the system adapts to volatility automatically rather than relying on fixed point values that only suit one symbol. The daily re-entry cap and spread filter add practical discipline that many raw breakout systems lack.
Known limitations. Breakout strategies are, by nature, vulnerable to false breakouts — the classic pattern where price briefly clears a level, triggers an entry, and then reverses back inside the range. This is most common in ranging, low-momentum markets that lack a clear trend. In such conditions the strategy may repeatedly signal near the edges of the previous day's range and give back small amounts on each attempt, which is exactly why the MaxTradesPerDay cap exists. The strategy also has no time-of-day filter, so it can act on a breakout during thin, illiquid hours where follow-through is less reliable. Finally, because it reconstructs the "day" from UTC calendar dates, the way sessions align to your broker's server time can shift where the day boundary falls, which is worth verifying before relying on the levels.
The honest takeaway is that this strategy tends to be more comfortable in trending, momentum-driven environments and less comfortable in quiet, range-bound ones — a trade-off common to the entire breakout family.
Risk Management Tips
Sound risk management matters far more than any single set of parameters. Consider these general principles as you study the strategy:
- Risk a small, fixed fraction per trade. A widely taught guideline is to risk no more than 1–2% of account equity on any single position. Adjust your lot size so that the ATR-based stop distance corresponds to that fraction, rather than trading a fixed lot blindly.
- Test on a demo account first. Run the EA on a demo account across a range of market conditions before considering any live use. This lets you observe how it behaves through both trending and choppy periods without financial consequences.
- Understand drawdown. Every strategy experiences losing streaks. Study the depth and duration of drawdowns in your testing so you know what a normal rough patch looks like and are not surprised by it.
- Size for the worst case, not the best. Position sizing should assume that consecutive losses can and will happen. Plan for the string of losers, not the winner.
- Review the parameters, don't over-fit them. It is tempting to tune every input until historical results look perfect. Over-optimised settings often fail to carry forward, so favour robust, sensible values over fragile ones.
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
- Expert Advisor: PreviousDayRangeBreakout.ex5 (1 downloads)
- Source Code: PreviousDayRangeBreakout.mq5 (1 downloads)
- Documentation: PreviousDayRangeBreakout.pdf (1 downloads)