Gold Donchian Breakout
- Uzmanlar
-
Kizhi Hamashima
I am a self-taught MQL5 EA developer specializing in XAUUSD (Gold) scalping strategies, with over 8 years of hands-on trading experience. My focus is on building robust, rule-based Expert Advisors that perform consistently under real market conditions. All EAs are developed and tested on XM Trading - Sürüm: 1.0
Gold Donchian Breakout — a free, fully mechanical Donchian channel breakout EA for XAUUSD (GOLD) on M5. No grid, no martingale, no averaging. Every trade is opened with a stop loss and a take profit.
How it works
- Entry: M5 close breaks the Donchian channel (default 20 bars).
- Trend filter: H4 EMA direction and distance, plus H4 ADX range.
- Tick volume filter: the signal bar must have above-average volume.
- Anti-chase filter: skips late breakouts after an extended run or a climax bar.
- Stop loss from H4 ATR, clamped to a % of price. Take profit in R (default 1R).
- Break-even at +0.5R, daily loss limit, consecutive-loss stop, Friday close.
- One position at a time by default. It can also count positions of other EAs on the same symbol.
Backtest (for reference only)
XAUUSD M5, 2020–2026, every tick based on real ticks, fixed 0.01 lot: 1,004 trades, profit factor 1.44, win rate 68%, max 4 losses in a row. The curve was almost flat from 2020 to 2023; most of the gain came in the later years. Past results do not guarantee future results. Please run your own test in the Strategy Tester with your broker's data.
Recommended use
- Symbol: XAUUSD / GOLD. Timeframe: M5 (set in inputs).
- Start with the minimum lot (default MaxLot = 0.01) on a demo account.
- Low-spread account and a VPS are recommended.
Main inputs
- Donchian_Period, TradeLongs / TradeShorts
- RiskPercent, MaxLot, DailyLossLimit_Pct, MaxConsecLosses, MaxSpread
- H4_EMA_Period, EmaMinDistPct, H4_ADX_MinLevel / MaxLevel
- SL_MinPct / SL_MaxPct, LongTP_R / ShortTP_R
- UseBreakEven, BE_TriggerR, UseAntiChase, FridayCloseHour, MagicNumber
Feedback
This EA is free. If you test it, a short comment or review with your broker and results helps a lot, and bug reports are welcome in the comments.

I'm testing this EA and the results by now are Great, now I'm testing in a Cent account, Thank you so much Kuzhi, Good Job!