Breakout Swing Gold: how I built a 6-strategy breakout EA for XAUUSD
Over the past months I've been building a breakout swing system for gold. This post explains the main design decisions, what I learned along the way, and how the EA is doing live.
1. One strategy wasn't enough
A single breakout setup had long flat or losing periods. What helped was running six independent breakout rules on D1 and H4 swing levels at the same time, each with its own pending order expiry and position limits. When one stops working for a few months, the others usually carry the account.
2. Every trade has a stop loss
No grid, no martingale, no averaging down. It makes the equity curve less smooth on paper, but the worst case is known in advance. After seeing many accounts blow up on gold's big moves, this was non-negotiable for me.
3. Lot size based on historical drawdown
Instead of a fixed % risk per trade, the lot is scaled so that the historical max drawdown of each strategy maps to a drawdown limit you choose. That makes risk easy to understand: "this setting has historically dropped about X% at its worst." The same trades are taken at every setting, only the lot size changes.
4. Pending orders and margin
With several pending orders waiting at once, the EA reserves margin for orders that are not filled yet, so a second order never triggers without enough free margin. Volume limits, stops level and market hours are checked before every request.
5. Live matches the backtest
I compared a live account with the Strategy Tester over the same period, on the same broker, and the trades matched trade by trade. Real tick data and the broker's own symbol settings (contract size, filling mode) made a big difference here.
6. Built-in Prop Firm Guard
For prop firm accounts there is a simple guard that respects daily and overall loss limits, together with a news filter.
A real example: 30 October 2026
Gold dropped around $85 during the London and New York sessions and the EA caught the move on the sell side. Three live accounts took exactly the same trades, only with different risk settings:
- Default set: +7.9% in one day
- Semi high risk set: +43.7%
- High risk set: +59.0%
This was an exceptional trend day, not a typical one. Higher risk settings also lose much more in losing periods. The default set is recommended for most traders.
[INSERT POSTER IMAGES HERE]
Links
- Live signal: https://www.mql5.com/en/signals/2397061
- Breakout Swing Gold on the Market: https://www.mql5.com/en/market/product/203745
Launch price: $299 for the first 10 copies (also available as a 1-month rent). The price will increase step by step to the final price of $799.
Questions about the logic or settings are welcome in the comments.
Henry


