- Strategy
- Buys the first intraday candle that closes above the previous day's high and sells the first that closes below the previous day's low, up to a daily trade limit.
- Risk model
- 1% of balance per trade (configurable), ATR stop-loss on every order, one position per symbol and magic number, one trade per day by default
What it does
The previous day's high and low are among the most watched intraday levels. Previous Day Breakout EA trades a close beyond either of them, on the idea that a break of yesterday's range can start a directional move. A daily limit stops it from trading the same level over and over when price chops around it.
How it works
On each new intraday bar, for the last closed candle of the current day:
- Levels: the high and low of the completed previous daily candle.
- Buy: the candle closes above the previous-day high (plus the buffer), and the candle before it did not.
- Sell: the candle closes below the previous-day low (minus the buffer), and the candle before it did not.
- The EA counts its own entries since the start of the server day; once the limit is reached, further breaks are skipped with a message.
- The stop is 1.5 ATR from entry. With "stop beyond level" on, it is moved further if needed so it sits at least 0.5 ATR back inside the broken level. The target is 2 R.
Entries are only taken in the trading-hours window (8 to 18 server time by default), which avoids the thin hours around the daily rollover.
How to use it
Use M15 to H1 charts. Breakouts tend to be more reliable when the previous day was narrow and the break comes during an active session. A small break buffer reduces trades on marginal closes. If you raise the daily limit, the EA can trade the opposite side later the same day, but never two positions at once.
Settings
| Input | Default | What it changes |
|---|---|---|
| Max trades per day | 1 | Daily entry limit |
| Break buffer (points) | 0 | How far the close must clear the level |
| Stop distance (x ATR) | 1.5 | Stop-loss size |
| Stop beyond level | true | Minimum stop room inside the level |
| Draw levels | true | Shows the previous-day high and low |
| Risk % / Fixed lots | 1.0 / 0 | Position sizing |
| Take-profit (R) | 2.0 | Target distance (0 = none) |
| Max spread (points) | 30 | Spread filter |
| Trading hours | 8 to 18 | Entry window (server time) |
| Break-even / Trailing | on at 1 R / off | Trade management |
Limitations
False breakouts are common: price closes beyond the level and then returns into the range. The daily candle depends on the broker's server time, so levels vary between brokers. Entries come at the candle close, often after a large part of the breakout move. Gaps at the weekly open can place price beyond the level before the first candle closes.
Before you run it live
Test the EA in the Strategy Tester across quiet and volatile months and then on a demo account. Check how your broker defines the trading day. Start with a small risk percentage and review risk management basics first. Trading carries a substantial risk of loss.

