Prior Day Breakout Pro MT4
- Experts
-
Allan Aparece Ninal
Desenvolvo indicadores e Expert Advisors para o MetaTrader 5.
Como trabalho:
- Cada indicador é verificado quanto a repintura: os sinais são decididos apenas em barras fechadas, e um teste tick a tick confirma que não mudam depois. - Versão: 1.3
- Atualizado: 28 novembro 2026
- Ativações: 10
Prior Day Breakout Pro MT4 is an Expert Advisor for MetaTrader 4 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.
MetaTrader 4 edition: the same rule, presets and panel as the MetaTrader 5 version. The presets passed the same criteria again in the MetaTrader 4 Strategy Tester; the table shows its numbers.
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 AutoTrading 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.
- 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
The default inputs are the XAUEUR H1 preset: 2R target, news off. Attach the EA to an XAUEUR H1 chart and keep the defaults to use it.
| Symbol and timeframe | News mode | Target | Out-of-sample trades | Profit factor |
|---|---|---|---|---|
| XAUEUR H1 | off | 2R | 612 | 1.40 |
| XAUEUR H1 | pause | 2R | 609 | 1.39 |
| XAUEUR H1 | pause + flat | 1R | 609 | 1.42 |
| XAUEUR M15 | off | 1R | 690 | 1.29 |
| XAUEUR M15 | pause | 1R | 677 | 1.27 |
| XAUEUR M15 | pause + flat | 1R | 677 | 1.27 |
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 4 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.
MetaTrader 4 has no economic calendar, so live the EA uses the same built-in list as the backtests. The list runs to December 2026; after that the panel says the list has ended and the news modes find no release. In the backtests the news modes changed results only slightly.
How it was checked
- Code check: this EA ran in the MetaTrader 4 Strategy Tester on all six presets. It took the same number of trades as the Python model: 612, 609, 609, 690, 677, 677. All entries but one per preset match in time and side; the other falls on the first or last day of the test. Exits can differ by a tick, because MetaTrader 4 builds its ticks from 1-minute bars in its own way.
- Closed bars only: signals do not change after a bar closes, so there is no repaint.
- Tester data: every tick, built from 1-minute broker prices, with a fixed spread of 25 points. Slippage and requotes are not modelled.
Use and limits
- By default the EA trades on any symbol, timeframe, target and news mode. Only the six presets passed my tests. Anything else shows not validated on the panel and has no testing behind it. Turn off the input "Allow live trading outside the validated presets" to trade only the presets. 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.
Automatic trading or signals only
By default the EA trades automatically: it opens the trade when its rule fires and manages it. If you would rather decide yourself, set "Dry run: alert each signal, open no trades" to true. The EA then opens nothing. Each signal it would have traded arrives as a pop-up alert with sound, a push notification on your phone, or both: direction, price, stop loss, take profit and lot. You review it and decide whether to enter by hand.
- Dry run is off by default. Nothing changes until you turn it on.
- "Dry run: pop-up alert with sound" and "Dry run: push to phone" are on by default and only work while Dry run is on. Turn one off to keep the other.
- Push to your phone: install the MetaTrader mobile app, copy its MetaQuotes ID and enter it in the terminal under Tools > Options > Notifications, then enable push notifications.
- In dry run the EA opens, closes and changes no trade, including trades you open by hand. The Strategy Tester only writes the signals to the log.
- Each signal is sent once. This is a tool for your own decisions, not advice, and no profit is promised.
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; true |
| Show the panel; draw the previous-day high and low | true; true |
| Dry run: alert each signal, open no trades | false |
| Dry run: pop-up alert with sound | true |
| Dry run: push to phone | true |
| Debug log for bug reports | false |
How to test in the Strategy Tester
- Open the Strategy Tester (Ctrl+R, or View > Strategy Tester).
- Choose Expert Advisor, then Prior Day Breakout Pro MT4.
- Set Symbol and Period to those of the preset you want to test.
- Set Model to "Every tick", the model my tests used. It needs 1-minute history for the period.
- Tick Use date and choose a range, for example 2023.07.01 to 2026.10.01.
- Set Spread. My test used a fixed spread of 25 points.
- Click Expert properties. On the Testing tab, use a deposit close to your own account. On the Inputs tab, make the changes below.
- Click Start.
| Preset | Inputs to change from the defaults |
|---|---|
| XAUEUR H1, news off | None |
| XAUEUR M15, news off | Target, x the stop distance (R); the preset's own value = 1 |
| XAUEUR H1, pause | News mode = Pause: no entry 30 min before to 30 min after a release |
| XAUEUR H1, pause + flat | Target, x the stop distance (R); the preset's own value = 1; News mode = Pause + flat: also close 5 min before a release |
| XAUEUR M15, pause | Target, x the stop distance (R); the preset's own value = 1; News mode = Pause: no entry 30 min before to 30 min after a release |
| XAUEUR M15, pause + flat | Target, x the stop distance (R); the preset's own value = 1; News mode = Pause + flat: also close 5 min before a release |
The default inputs already are the XAUEUR H1 (2R target, news off) preset, so that one needs no changes.
You can try other settings the same way. The tester ignores any live-only option, and a test of other settings is not a validated preset. A backtest describes the past only.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Session Levels MT4 | Add it to the same chart. | It draws the previous-day high and low that the EA trades. The EA also draws its own dotted lines, so the indicator is optional. |
| Prop Rules Guard MT4 | Put the Guard on one chart of the prop account and set the firm preset. Leave "Prop Rules Guard lock" on (default on). | The EA reads the Guard's lock and stops opening trades while it is locked. This is read from the code; the two were not run together live. |
| EA Health Monitor MT4 | Give the EA its own magic number in its inputs. Attach the monitor to one chart of the account. | It shows one row per magic number, so you can read this EA's trades on their own. |
| Prop Rules Monitor MT4 | Attach it to one chart of the account while the EA runs. | It shows your distance to a prop firm's limits. It only watches and never closes anything. |
Free and Pro: Prior Day Breakout MT4 and this EA share the default magic number 26101801. Do not run both on the same symbol and timeframe.
XAUEUR is a gold market. Running it with other gold EAs adds to the same exposure.
Related products
- Prior Day Breakout Pro: the same Expert Advisor for MetaTrader 5.
- Prior Day Breakout MT4: the same rule with a fixed 0.01 lot and no news modes, for the two news-off presets.
- Session Levels MT4: a free indicator that draws the previous-day high and low, session boxes and alerts. It places no trades.
- Prop Rules Guard MT4: 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? It trades there by default, but it was tested there and did not pass, so it is not a validated preset.
How do I report a problem? Turn on the debug log, repeat it, and send the DBG lines with your inputs and a screenshot.
Reporting a bug or error
- In the inputs, set "Debug log for bug reports" to true.
- Leave the EA running until the problem happens.
- Open the Experts tab in the Terminal window (Ctrl+T), select the lines that start with "DBG", right-click and choose Copy (or choose Open to get the log folder).
- Send them as a comment on this product page or as a LinkedIn message, with the symbol, timeframe, EA version and what you expected to happen.
The debug log never contains your login, name, server, balance or equity. Set it back to false afterwards. I answer only through the comments on this page and on LinkedIn.
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.
