Gold Breakout Sentinel
- Experts
-
Allan Aparece Ninal
Sviluppo indicatori ed Expert Advisor per MetaTrader 5.
Come lavoro:
- Ogni indicatore viene controllato contro il repainting: i segnali vengono decisi solo su barre chiuse, e un test su ogni tick conferma che non cambiano in seguito. - Versione: 1.20
- Aggiornato: 2 novembre 2026
Gold Breakout Sentinel is an Expert Advisor for MetaTrader 5 that trades XAUUSD on the H1 chart. It places pending stop orders at yesterday's high or low when a stochastic turn and a Bollinger Band filter agree. Every order has a fixed 0.01 lot and a fixed stop loss and take profit.
The EA trades gold only. It is a rules-based daily breakout system, not a profit promise. My own tests found no proven edge.
Built for gold. Gold is what this EA was designed and tested on, and it works best there. The tested setting is XAUUSD H1 with the default inputs. It will also trade other symbols, but in my tests the rules were not profitable on 36 others.
Quick start
- Enable Algo Trading and attach the EA to an XAUUSD H1 chart (XAUUSDm and XAUUSD.pro work).
- Keep the default inputs. They are the settings used for every check below.
- Read the panel. It shows what the EA is waiting for, and the Risk row shows what the next 0.01-lot trade risks at its stop.
- Try it first in the Strategy Tester or on a demo account.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
What you see on the chart
- An info panel: what the EA is waiting for, pending orders, the open trade and closed-trade results.
- Yesterday's high and low drawn across today, and an arrow at each signal with its outcome in the tooltip.
- A Risk row that shows what the next 0.01-lot trade risks at its stop, as a percent of your balance.
How the trade is built
- Once per H1 bar, the EA checks the stochastic signal line (closing prices). If it peaked on the previous bar and the Bollinger Band filter agrees, it places a buy stop at yesterday's high. If the line troughed, it places a sell stop at yesterday's low.
- The order is placed only while price has not passed that level. A new signal on the same side replaces it.
- Stop loss and take profit are each 1.9% of the entry price. No grid, no martingale, no averaging.
- An unfilled order is deleted after 9 bars. No new order is placed while a position is open.
- Yesterday is the New York-close day on any broker. The EA detects the broker clock itself.
Lot size and safety checks
Every trade uses 0.01 lot, or the broker's minimum where that is larger. Before each order it checks margin, stop and freeze levels and the stop-out level. If the account cannot carry the order, it skips it and shows the reason on the panel. At a gold price near 4,200 the stop on 0.01 lot loses about 80 USD. A balance of about 8,000 USD keeps the risk near 1% per trade. Smaller balances risk more, and the Risk row says so.
Who it is for / not for
For traders who want a transparent, rule-based gold breakout EA to run on a demo or small live account and watch. Not for anyone looking for a proven or promised result, other symbols, or lot sizing by risk.
Inputs
| Input | Default |
|---|---|
| Magic number | 260931 - ID of this EA's orders |
| Bollinger Bands period | 9 - band used by the filter |
| Stochastic %K / signal / slowing | 23 / 3 / 7 - the stochastic turn |
| Stop loss / take profit, % of entry price | 1.9 / 1.9 - distance of stop and target |
| Pending order expiry, bars | 9 - how long a stop order waits |
| Broker server clock / offset from UTC | Auto / 0 - the offset is used only with Fixed offset |
| Show info panel / show levels and signals | true / true |
| Dry run: alert each signal, open no trades | false – when on, no trade is opened; each signal is sent as an alert |
| Dry run: pop-up alert with sound | true – pop-up with sound; used only when dry run is on |
| Dry run: push to phone | true – needs your MetaQuotes ID; used only when dry run is on |
| Debug log for bug reports | false |
The defaults are the settings used for every check below. There is no set file. Attach the EA to an XAUUSD H1 chart and keep the defaults.
Use and limits
Enable Algo Trading and attach to an XAUUSD chart (XAUUSDm and XAUUSD.pro work). It also trades other symbols by default. In the Strategy Tester any symbol can be tested. It has no indicator buffers and sends no trade alerts. In dry run it sends signal alerts.
Automatic trading or signals only
By default the EA trades by itself: it opens each trade when its rule fires and manages the stop. If you prefer to decide each entry yourself, set "Dry run: alert each signal, open no trades" to true.
- With dry run on, the EA opens no trade and changes no stop. Each signal arrives as one alert with the direction, symbol, timeframe, price, stop-loss, take-profit (where the rule has one) and lot size the EA would have used.
- The alert is a pop-up with sound in the terminal and/or a push notification to your phone. Both are on when dry run is on; switch either one off in the inputs. Each signal is also written to the Experts log.
- You review the signal on your side and decide whether to enter by hand.
- For push on your phone: install the MetaTrader mobile app, find your MetaQuotes ID in its settings, and enter it in the terminal under Tools > Options > Notifications.
- In dry run the EA does not manage trades, including trades you open by hand.
- Dry run is off by default. In the Strategy Tester it only writes to the log.
How it was checked
- Code checks (release check, version 1.16): MQL5 validation-style runs on EURUSD H1, XAUUSD D1, GBPUSD M30 and EURUSD M1 with a small account, no error lines. Non-repainting check on XAUUSD H1, January to October 2026: 400 signals, identical between every-tick and 1-minute OHLC models.
- Backtest (a Python reproduction of the rules, not a Strategy Tester run). Data: XAUUSD H1 broker history, January 2021 to October 2026, 0.01 lot, with spread, commission and swap. Result: 234 trades, profit factor 1.44. This was the most favourable period for these settings. Over 2009 to 2020 the same settings lost money (profit factor 0.94).
- On 36 other symbols, 2023 to 2026, the rules were not profitable. This is why the EA is built for gold.
How to test in the Strategy Tester
- Open the Strategy Tester (Ctrl+R, or View > Strategy Tester).
- Choose Gold Breakout Sentinel as the Expert Advisor.
- Set Symbol and Timeframe to those of the preset you want to test.
- Set the model to "1 minute OHLC", the model my tests used.
- Choose a date range, for example 2023.07.01 to 2026.10.01.
- Use a deposit and leverage close to your own account.
- Open the Inputs tab, make the changes below, and start the test.
| Preset | Inputs to change from the defaults |
|---|---|
| XAUUSD H1 | None |
The default inputs already are the XAUUSD H1 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.
Do not run this EA under a tool that closes trades at prop-firm limits. The EA does not read such a lock. After the tool closes its trades, the EA can open new ones and the tool closes them again. Rely on the EA's own stop loss and fixed lot instead.
| Product | How to use them together | Why |
|---|---|---|
| Prop Rules Monitor | 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. |
| EA Health Monitor | 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. |
| Risk Position Tool | Put the signal on the chart. Drag the entry and stop lines of the tool. It gives the lot for your risk. | It separates where you enter from how much you risk. The tool places no orders. |
Several gold Expert Advisors follow the same market. Running them together adds to one exposure; this is not a tested diversification.
Related products
- Prior Day Breakout: an EA that trades the break of the previous-day high or low on XAUEUR. It computes the levels itself.
- Gold Breakout Sentinel MT4: the same Expert Advisor for MetaTrader 4.
- All my products on MQL5
Questions
Does it repaint? No. It acts on closed H1 bars.
Can I try it first? Yes, in the Strategy Tester and on a demo account.
Why did it not trade today? Most days have no signal, or price has passed yesterday's level. The panel shows why.
Can two trades be open at once? On a hedging account both stop orders can fill on a day that breaks both levels. No new order is added while a position is open.
How do I report a problem? Set Debug log for bug reports to true, repeat the problem, and send me the DBG lines from the Experts tab with the symbol, timeframe and inputs.
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 Toolbox, right-click in the log and choose Copy (or open the log folder from the same menu).
- Send it 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.
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 gold with leveraged products carries a high risk of loss, and past results do not predict future ones.
