Prior Day Breakout Pro
- Experts
-
Allan Aparece Ninal
Je développe des indicateurs et des Expert Advisors pour MetaTrader 5.
Ma façon de travailler :
- Chaque indicateur est vérifié contre le repaint : les signaux sont décidés uniquement sur des barres clôturées, et un test sur chaque tick confirme qu'ils ne changent plus ensuite. - Version: 1.0
- Activations: 10
Prior Day Breakout Pro is an Expert Advisor for MetaTrader 5 that trades the previous-day high and low breakout on XAUEUR. It sizes each trade by a fixed lot or a risk percent. It can pause around high-impact news. Six tested presets are included.
This EA promises no profit. Every result below is a backtest on broker history, not live trading. The tests passed on gold only. Thirty-seven symbols were tested.
Quick start
- Open an XAUEUR chart on H1 or M15 (a prefixed or suffixed name is fine). Attach the EA from the Navigator and keep Algo Trading enabled.
- Set Target (R) and News mode to one of the six presets in the table below. The Preset row on the panel then reads validated.
- Choose the size: Fixed lot (default 0.01) or Risk % of balance (default 1.0). The Lot row on the panel shows the choice.
- Leave the filters off to run the rule as tested, or add a spread limit, a Friday cut-off or break-even.
Account
- Minimum balance: 1,500 USD at 0.01 lot.
- Recommended balance: 3,000 USD at 0.01 lot.
- Why: in the out-of-sample backtest at 0.01 lot, the largest drawdown was 673 USD, the largest single loss was 373 USD, and the widest stop was about 710 USD. These are backtest figures, not a limit on future losses.
- Leverage: 1:100 or higher. Hedging or netting account.
- Risk-% sizing: with 1% risk, use 5,000 USD or more. On a smaller balance the minimum lot can risk more than 1%. Live, the EA then skips the trade and does not raise the lot.
- Standalone: Everything is built in. You do not need to buy or install any other product named on this page. The Prop Rules Guard lock is optional and only applies if you also run that tool.
What you see on the chart
- Panel: rule, chart, target and news mode, preset status, levels, last signal, open position, lot, news state and lock state.
- Levels: yesterday's high and low, drawn as dotted lines across the current day.
The rule in brief
On each new bar the EA reads the bar that just closed. The levels are the high and low of the previous trading day, taken from 1-minute bars. A buy needs a close above the high. A sell needs a close below the low.
Only bars that open between 01:00 and 20:00 server time count. Each side can fire once per day. The EA then sends a market order at the next open.
The stop is the other side of yesterday's range. The target is the preset's multiple of that stop distance, called R. Any open trade is closed at 23:00 server time. There is one position at a time. A trade is skipped if its stop is under eight times the spread.
Validated presets
| Symbol and timeframe | News mode | Target | Out-of-sample trades | Profit factor |
|---|---|---|---|---|
| XAUEUR H1 | off | 2R | 612 | 1.37 |
| XAUEUR H1 | pause | 2R | 609 | 1.36 |
| XAUEUR H1 | pause + flat | 1R | 609 | 1.38 |
| XAUEUR M15 | off | 1R | 690 | 1.27 |
| XAUEUR M15 | pause | 1R | 677 | 1.24 |
| XAUEUR M15 | pause + flat | 1R | 677 | 1.25 |
Backtest, not live trading: broker history, 1 July 2023 to 8 October 2026, 0.01 lot, spread and swap included, no commission. Each preset passed the Python backtest and the MetaTrader 5 Strategy Tester. Each has its own setting, frozen on 2020 to mid-2023 data before the later period was opened.
Read the numbers with care. Of 37 symbols tested with this rule, only XAUEUR passed. XAUUSD came close but stayed below the bar. Most of the gain came from buys in a period when gold rose strongly. The six rows are one idea in six forms, and they share most trades. Commission was not modelled.
What Pro adds
- Lot sizing: fixed lot, or a risk percent of balance lost if the stop is hit, never below the broker minimum. The EA skips a live trade if even the minimum lot risks more than asked.
- News modes: off, pause or pause + flat.
- Filters: maximum spread in points, and no new trades on Friday from a chosen hour.
- Break-even: moves the stop to the entry, plus optional points, at a profit of x R.
- Prop Rules Guard lock: no new trades while the lock is set. It is on by default.
News modes
Off by default, so the rule runs as tested. Pause blocks new entries from 30 minutes before to 30 minutes after a high-impact release. Pause + flat also closes an open trade 5 minutes before the release.
The backtests used a built-in list of 556 high-impact USD releases from 2020 to 2026. It covers NFP, CPI, PPI, retail sales, PCE, GDP advance and FOMC. The list was applied to XAUEUR as is.
Live, the EA reads the MetaTrader economic calendar. It takes high-importance events for USD and for the symbol's own currencies, such as EUR. That is more events than the backtest list, so live the filter is not identical to the tested one. In the backtests the news modes changed results only slightly.
How it was checked
- Code check: this EA ran in the Strategy Tester on all six presets. All 612, 609, 609, 690, 677 and 677 trades matched the Python model in time, side and exit.
- Closed bars only: signals do not change after a bar closes, so there is no repaint.
- Tester data: 1-minute OHLC prices from broker history. Slippage and requotes are not modelled.
Use and limits
- Live, the EA trades only the six presets. On another symbol, timeframe, target or news mode it shows not validated and sends no orders. An input can allow other settings. It is off by default. The Strategy Tester accepts any symbol.
- The tests used a server clock of UTC+2, or UTC+3 in US summer time. The 01:00 to 20:00 window follows your server clock, so check that it matches.
- If the market is closed at 23:00, the trade closes at the first tick after it reopens.
- XAUEUR is offered by few brokers. Check that yours lists it.
Inputs
| Input | Default |
|---|---|
| Target, x the stop distance (R); news mode | 2.0 (1.0 on M15); Off |
| Magic number; maximum slippage, points | 26101801; 30 |
| Sizing; fixed lot; risk percent of balance | Fixed lot; 0.01; 1.0 |
| Break-even at x R; points beyond the entry | 0 (off); 0 |
| Maximum spread, points; no new trades on Friday from this hour | 0 (off); 0 (off) |
| Refuse new trades while Prop Rules Guard is locked; allow live trading outside the validated presets | true; false |
| Show the panel; draw the previous-day high and low; log every signal and trade | true; true; false |
Related products
- Prior Day Breakout: the same rule with a fixed 0.01 lot and no news modes, for the two news-off presets.
- Session Levels: a free indicator that draws the previous-day high and low, session boxes and alerts. It places no trades.
- Prop Rules Guard MT5: sets the lock that this EA respects.
- All my products on MQL5
FAQ
Repaint? No, closed bars only.
Why no trade today? The close must break yesterday's high or low during the session, once per side. A news window, spread limit or lock can also block it. The panel shows the reason.
Which news mode should I use? Off is the rule as tested. The other two are options, not improvements.
Does it work on XAUUSD? Not live. It was tested there and did not pass, so it sends no orders unless you allow other settings.
How do I report a problem? Turn on the debug log, repeat it, and send the DBG lines with your inputs and a screenshot.
If it helps your trading, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading carries a risk of loss, and past results do not predict future results.
