Gold Level Breaker
- Experts
- Versione: 1.15
- Attivazioni: 5
Gold Level Breaker trades two simple, transparent ideas on XAUUSD: the breakout of yesterday's high or low, and (since v1.16) a second setup that trades just ahead of unbroken daily swing highs and lows. No grid, no martingale, no averaging down. Every trade has a fixed stop loss and take profit from the moment it opens, and the default risk is 0.4% of balance per trade for each setup. Every rule is an input you can see and test yourself.
The main setup is a trend-following breakout system. Expect a low win rate there: most trades are small losses, and the profit comes from a few large winners. The second setup wins more often with smaller targets, and it tends to earn in different months, which smooths the combined equity curve (see the backtest section).
How it trades (default rules)
- Daily breakout entries: buys when price breaks above yesterday's high, sells when it breaks below yesterday's low. At most one entry per direction per server day.
- Trend filter: trades only in the direction of the D1 EMA(200) and only when D1 ADX(14) is at least 20. Both can be adjusted or turned off.
- Fixed exits by default: every trade opens with a stop loss of 5 USD and a take profit of 50 USD (per 0.01 lot, scaled with the lot size). By default the stop and target are not moved afterwards. One optional setting, Trailing stop, offers two fixed presets (see "Trailing stop" below).
- Position sizing: 0.4% of balance at risk per trade by default (also available: fixed lot, or lot per balance step).
- One position at a time: maximum 1 open position by default. A signal that appears while a position is open is skipped.
- Equity-curve filter: risk is halved while the EA's closed-trade equity curve is below its 20-trade moving average, and returns to normal when it recovers.
- Time rules (server time): no entries before 01:05; no new entries on Friday after 22:30; all positions are closed on Friday at 22:57.
- Risk controls (off by default): spread limit, daily loss limit, maximum lot, and an equity drawdown pause with optional cooldown.
Second setup: daily swing levels (v1.16, on by default)
- Levels: the high (for buys) or low (for sells) of one of the last 6 daily candles that is still unbroken (no newer day went beyond it) and is a swing (beyond the older neighbouring day). A level must be at least one day old (1440 M1 bars).
- Entry: buys when Ask reaches 0.0474% below an unbroken swing high, sells when Ask reaches 0.061% above an unbroken swing low, i.e. just before the level. The nearest valid level is used; once its trigger price is touched it is used up for the day. At most one open position per direction.
- Exits: stop loss 15 USD per 0.01 lot, take profit 0.33% of the entry price. At the close of each M1 candle, if the trade is at least 0.12% in profit, the stop loss moves to entry +0.033% (profit locked).
- News days: no new entries of this setup on US Non-Farm Payrolls and FOMC days.
- Separate from the main setup: own magic number (InpMagic + 1), own risk (InpSwingRiskPct), no D1 trend filter, not limited by InpMaxPositions and not part of the equity-curve filter. It uses the same time rules, Friday close and risk controls. It is switched off on netting accounts.
Trailing stop (one setting)
InpTrailMode ("Trailing stop") is one setting with three fixed choices. There are no further trailing inputs to tune. All amounts are in USD per 0.01 lot and scale with the lot size.
- None (TRAIL_NONE): Default. The stop loss (5 USD) and take profit (50 USD) stay exactly as set when the trade opens.
- Tight trail (TRAIL_FIXED_USD): Once the trade is in profit by +1.00 USD, the stop loss follows the best price reached, at a distance of 0.50 USD.
- Break-even + steps (TRAIL_BREAKEVEN_STEP): Once the trade is in profit by +1.50 USD, the stop loss moves to the entry price +0.15 USD. After that, for every further +1.50 USD of profit the stop loss moves up by another 1.50 USD.
Backtest comparison of the three choices (Vantage XAUUSD, "Every tick based on real ticks", 0.4% risk, estimated slippage deducted; each year run separately, 2021 covers August-December only; figures are % of balance):
| Trailing stop | Sum of yearly returns 2021-2026 | Worst-year drawdown |
|---|---|---|
| None (default) | +114% | 9.3% |
| Tight trail | +10% | 2.9% |
| Break-even + steps | +22% | 3.3% |
None gave the highest backtest return but the equity curve swings more. The two trailing choices lock in profit early, so the equity curve is smoother, but the return is much lower. They are also sensitive to slippage, because every winning trade is small. These are backtest figures only and do not promise future profits.
Main inputs and defaults
| Input | Default | Meaning |
|---|---|---|
| InpTrendEMA | 200 | D1 EMA period: buy above, sell below (0 = off) |
| InpMinADX_D1 | 20 | Minimum D1 ADX(14) to allow entries (0 = off) |
| InpStopUSD | 5.00 | Stop loss, USD per 0.01 lot |
| InpTargetUSD | 50.00 | Take profit, USD per 0.01 lot |
| InpTrailMode | TRAIL_NONE | Trailing stop: None (default), Tight trail, or Break-even + steps (see "Trailing stop" above) |
| InpSizingMode | SIZING_RISK_PCT | Position sizing mode |
| InpRiskPercent | 0.4 | % of balance lost if the stop is hit |
| InpMaxPositions | 1 | Maximum open positions at once (0 = off) |
| InpEqFilter | true | Halve the risk while the equity curve is below its average |
| InpEqFilterLen | 20 | Equity-curve moving-average length (closed trades) |
| InpEqFilterCut | 0.5 | Risk multiplier while below the average |
| InpSwingSetup | true | Second setup on unbroken D1 swing levels (v1.16) |
| InpSwingRiskPct | 0.4 | % of balance lost if a second-setup stop is hit |
| InpStartHour / InpStartMinute | 1 / 5 | No entries before this server time |
| InpCloseFriday | true | Close all positions on Friday (InpFridayCloseHour / InpFridayCloseMin = 22 / 57) |
| InpMaxSpreadPoints, InpDailyLossPct, InpMaxDrawdownPct, InpMaxLots | 0 (off) | Optional risk limits |
Requirements
- Symbol: XAUUSD (your broker's gold symbol)
- Chart: any timeframe. The EA reads D1 levels; tests used H1
- Account: low-spread / ECN account recommended; hedging (on netting accounts only the main setup trades)
- Minimum balance: the smallest trade is 0.01 lot, which risks about 5 USD at the main setup's stop and about 15 USD at the second setup's stop. On balances below roughly 1,250 USD (main) or 3,750 USD (second setup) the real risk per trade is therefore higher than 0.4%
- VPS recommended
Strategy Tester backtest results
These are backtest results from the MetaTrader 5 Strategy Tester. They are not results of real trading. Past performance does not guarantee future results.
Test settings: Gold Level Breaker v1.16 with default inputs, XAUUSD (Vantage), H1 chart, "Every tick based on real ticks" model, 10,000 USD initial deposit, one continuous run from 2020.10.21 to 2026.09.24.
| Run | Trades | Net profit | Profit factor | Maximum drawdown |
|---|---|---|---|---|
| v1.16 (both setups), no slippage simulated | 870 | +19,004.26 USD (+190%) | 1.78 | 7.25% (equity) |
| v1.16, estimated slippage (see below) | - | about +155% | - | 8.3% (closed-trade equity) |
| Main setup only (InpSwingSetup = false, same as v1.15), no slippage | 468 | +14,643.96 USD (+146%) | 1.74 | 9.16% (equity) |
| Main setup only, estimated slippage | - | about +122% | - | 11.3% (closed-trade equity) |
The Strategy Tester does not simulate slippage. The estimated rows are made outside the tester by deducting 0.10 USD at entry and 0.30 USD on every exit that is not a take profit (stop loss, locked-profit stop, Friday close), plus commission. It is an estimate, not a tester result, and real execution can differ.
Return by calendar year (v1.16, estimated with slippage, compounded, as % of the balance at the start of each year):
| 2021 | 2022 | 2023 | 2024 | 2025 | 2026 (to 24 Sep) |
|---|---|---|---|---|---|
| -1.9% | -1.7% | +10.0% | +13.1% | +80.0% | +18.4% |
What these numbers do not show well:
- 2021 and 2022 were small losing years, and most of the profit comes from 2024-2026, when gold trended strongly. A year like 2025 should not be expected as normal.
- Long stretches below the equity peak happen: in the backtest the account once spent more than 2 years below a previous high.
- For comparison, simply buying and holding gold over the same period returned roughly +121%, with a maximum price decline of about 27%. The EA's backtest drawdown was much smaller.
- The default rules were chosen using 2021-2026 data, so this is not an independent out-of-sample test. Results depend on broker data, spread, execution and account settings.
Before you start
Test with "Every tick based on real ticks". Check your broker's gold contract size, trading hours, spread and server timezone. The default entry and Friday times assume a GMT+2/GMT+3 server. The spread, daily loss, maximum lot and drawdown limits are off by default; set them for your own risk policy. If you enable the drawdown pause, set a cooldown above 0 unless you want the EA to stop permanently.
Trading gold carries a risk of loss. With a fixed stop and a far target, the win rate is low and losing streaks are normal, so size your risk accordingly. Start on demo and check that the EA's behaviour fits your risk tolerance.
