Gold Channel Breakout
- Experts
- Versione: 2.10
Gold Channel Breakout is a fully automated, trend-following Expert Advisor for Gold (XAU/USD). It trades breakouts of a price channel and rides the move with a volatility-based trailing stop. The logic is simple, transparent and 100% rule-based — [b]no martingale, no grid, no averaging down, no risky tricks[/b].
How it works
- It tracks the highest high and lowest low of the last N bars (a Donchian-style channel).
- When price closes above the channel it opens a BUY; when price closes below it opens a SELL. This aims to catch the start of a strong directional move.
- An optional EMA(200) trend filter allows trades only in the direction of the higher trend, to avoid fighting the market.
- The stop-loss adapts to current volatility (a multiple of ATR): it widens when the market is wild and tightens when it is calm.
- A trailing stop follows the trade once it moves into profit — letting winners run while protecting gains. This is the core idea behind capturing large gold trends.
- Position size is calculated automatically to risk a fixed percentage of the account balance on each trade.
Key features
- Pure breakout trend-following logic — easy to understand and verify.
- Volatility-adaptive stop-loss and trailing stop (ATR-based).
- Automatic risk-based position sizing (fixed % of balance).
- One position at a time. No martingale, no grid, no averaging.
- Every parameter is exposed and adjustable.
- Symbol-independent — works with any broker's gold symbol, just attach it to the chart.
How it was built
This EA was tested on real-tick history across several years (2023–2026) and checked with walk-forward analysis: parameters chosen on past data were verified on later, unseen periods. This is done to reduce curve-fitting. The default settings use standard, non-over-optimized values, not numbers squeezed to fit one lucky year.
Please read — honest notes
- No trading strategy can guarantee profit. Past backtest performance does NOT guarantee future results.
- Trading leveraged instruments carries a high risk of loss. Use only risk capital you can afford to lose.
- Always test on a demo account first — with your own broker's real spread and execution — before going live.
- Real results depend on your broker's spread, commission, swap and execution quality. Gold spreads can widen sharply during volatile moments, which affects performance.
Recommendations
- Symbol: Gold (XAU/USD) — for example GOLD or GOLD# depending on your broker.
- Timeframe: H4 (the EA uses its own timeframe input regardless of the chart it is attached to).
- Account: hedging account; a low-spread (ECN / Raw) account is recommended.
- A 24/7 VPS is recommended so the EA never misses a signal.
- Start on demo, then move to a small live account.
Input parameters
- Timeframe — the timeframe the strategy runs on (default H4).
- Magic number — unique ID so the EA manages only its own trades.
- Risk per trade (%) — percent of balance risked on each trade (default 0.5).
- Max slippage (points) — maximum allowed slippage on order execution.
- Channel period — number of bars used to build the breakout channel (default 20).
- Use trend filter — if true, trade only in the direction of the EMA trend.
- EMA period — period of the trend-filter moving average (default 200).
- ATR period — period of the ATR used for stop-loss and trailing (default 14).
- Stop loss (x ATR) — initial stop distance as a multiple of ATR (default 2.0).
- Take profit (x ATR) — optional fixed target as a multiple of ATR; 0 = disabled, let the trailing stop manage the exit (default 0).
- Use trailing — enable or disable the trailing stop (default true).
- Trailing distance (x ATR) — how far the trailing stop follows price, as a multiple of ATR (default 3.0).
- Trailing start (x ATR) — profit (in ATR) required before the trailing stop activates (default 1.0).
- Max spread (points) — skip new trades if the spread is above this value; 0 = no limit.
- Allow long / Allow short — enable buy trades and/or sell trades.
- Min trades / Drawdown reference — used only by the built-in optimization criterion (Custom max) in the Strategy Tester; no effect on live trading.
This EA is free — try it, test it on demo, and judge it with your own data. Honest feedback and bug reports are welcome. If you have any question before using it, feel free to send a message.
