Gold Trend M5 Scalper
- Experts
- Versione: 1.0
- Attivazioni: 5
Gold Trend Scalper — XAUUSD M5
OVERVIEW
Gold Regime Trend Scalper is a rule-based Expert Advisor built specifically
for XAUUSD (Gold) on the M5 timeframe. Unlike simple indicator-crossover
scalpers, it only takes a trade when three independent layers agree: a
confirmed EMA trend structure, a pullback entry with structure break
confirmation, and a higher-timeframe "market regime" filter that keeps the
EA out of the market during flat, low-volatility conditions.
The core idea: most scalping systems lose money during ranging markets.
This EA measures trend strength on the Daily chart (ADX) and volatility on
the H4 chart (ATR as % of price) before allowing any trade — so it stays
flat during chop and only engages when Gold is genuinely trending.
KEY FEATURES
- Trend + pullback + structure-break entry logic (EMA 20/50/200, RSI,
volume confirmation)
- Dual-timeframe regime filter (Daily ADX + H4 ATR%) to avoid trading
in ranging/low-volatility conditions
- Fully automatic ATR-based Stop Loss and Take Profit (no fixed pip
values — adapts to current volatility)
- Configurable Risk/Reward ratio
- Automatic break-even
- ATR-based trailing stop
- Partial position close to lock in profit while letting a runner ride
- Daily loss / daily profit limits with automatic trading halt
- Automatic pause after a configurable number of consecutive losses
- Risk-based position sizing (% of account balance per trade) or fixed
lot mode
- Session filter (London / New York / Asia, fully configurable)
- Economic news filter (optional, based on the built-in MT5 calendar)
- Clean, commented MQL5 code — no DLLs, ECN-account compatible
RECOMMENDED SETUP
- Symbol: XAUUSD (Gold) only — the EA is not designed for other
instruments
- Timeframe: M5
- Account: ECN/Raw-spread account strongly recommended (the strategy is
spread-sensitive; wide-spread accounts will underperform)
- Recommended starting risk: 1% per trade (the default risk setting
ships conservative — increase only once you understand the drawdown
behavior on your own account)
- VPS recommended for 24/5 uninterrupted operation
HOW IT WORKS (SUMMARY)
1. Regime filter: checks Daily ADX and H4 ATR (as % of price) — no
trades are evaluated unless both confirm a genuinely trending,
volatile market.
2. Trend filter: EMA20 > EMA50 > EMA200 (or inverse for shorts) plus
price above/below EMA200.
3. Entry trigger: price pulls back to the EMA20 zone, then a candle
closes beyond the prior structure high/low (break of structure),
confirmed by ADX/DMI direction and above-average volume.
4. Trade management: ATR-based SL/TP from entry, automatic break-even
once price moves in favor, ATR trailing stop, and a partial close to
bank profit on part of the position while the remainder is trailed.
BACKTESTING NOTES — PLEASE READ
This EA has been backtested extensively on historical XAUUSD data,
including validation on 100%-real-tick data for the most recent months
(the maximum real-tick history currently available from most brokers).
Longer-horizon tests (1-2+ years) were run on generated OHLC data, which
is a reasonable but less precise approximation of real trading
conditions than tick-level data.
As with any trading system: past backtest performance does not
guarantee future results. Market conditions change, and a strategy that
performed well historically can underperform in future regimes. Please:
- Test on your own broker's demo account before going live
- Start with conservative risk settings
- Never risk money you cannot afford to lose
RISK WARNING
Trading leveraged instruments such as Gold CFDs carries a high level of
risk and may not be suitable for all investors. This product is a
trading tool, not a guarantee of profit. Always use proper risk
management and never risk capital you cannot afford to lose.
SUPPORT
Questions about inputs, setup, or optimization are welcome via the
comments section or private message.
