Trend Trading XAUUSD
- Experts
- Han-chieh Lin
- Versione: 1.1
- Attivazioni: 5
Gold Trend Trading EA (XAUUSD) v1 — H4 Filter + H1 Execution (Recommended: H1)
This is a trend-focused Expert Advisor designed for Gold (XAUUSD).
It uses a H4 trend filter (direction) + H1 execution (entries) to avoid forced trades and focus on higher-quality setups during trending market phases.
Key Highlights
• Focused on XAUUSD (suffix allowed, e.g., XAUUSD.e)
• Recommended timeframe: H1
(Trend systems may stay inactive for some time depending on market structure.)
• Stricter filtering: H4 EMA trend direction + H1 ADX strength filter
• Risk-first approach: dynamic lot sizing based on account equity and stop distance; each trade includes SL/TP logic
• Frozen v1 uses a single-position approach: no martingale, no grid, no averaging
Live Status (Transparency)
• Live started: 2026-02-11
• Current status: no trades yet
Reason: the EA trades only when trend conditions are met. This can result in periods without trades.
Recommended Setup (Important)
• Recommended timeframe: H1
• Recommended symbol: XAUUSD (suffix allowed)
Default settings are already configured to the recommended profile (InpRiskControlPct=75). Parameters are frozen in this version — no .set file is required; just install and run.
Note: Gold spreads, commissions, price digits and contract specifications vary significantly across brokers and can materially affect performance.
Risk Profile (Easy to Understand)
The EA includes a risk control parameter: InpRiskControlPct
• Recommended value: 75 (0.75)
On many typical account specifications, this often results in an initial trade size around ~0.01 lots, but the EA uses risk-based dynamic lot sizing. The final lot size depends on equity, volatility (ATR), tick value and contract specifications.
Important: 0.01 is only a common example and not a guarantee.
Python Backtest (Method & Results)
We run long-term robustness testing in Python using a Monthly Reset evaluation.
Monthly Reset definition (reset = USD 2000)
• Test period: 2016–2025 (10 years)
• Warm-up: from 2014 (indicator warm-up only)
• At the start of each month, equity is reset to USD 2000; the strategy runs for that month, results are recorded, and the next month starts again from USD 2000.
Purpose: evaluate month-by-month robustness and tail-risk exposure while reducing compounding path dependency.
Results summary (10Y monthly reset)
• risk_scale = 1.0: net_total = 8701.53, blowup_months = 7
• risk_scale = 0.75 (recommended): net_total = 11356.84, blowup_months = 3
• risk_scale = 0.5: net_total = 8803.22, blowup_months = 2
Note: blowup_months counts the months where a predefined risk threshold / blow-up condition was triggered (as defined in the backtest risk rules).
Risk Disclaimer
Past performance and backtests do not guarantee future results. Live trading includes spread, commission, slippage, execution differences and regime changes. Please test on a demo account or with small risk first.
Compliance / Validation Note (MQL5 Market)
• MQL5 Market performs automatic validation on multiple symbols/timeframes.
• To ensure validation can run, this EA does not fail initialization due to symbol/timeframe mismatch.
• In live/demo trading, outside the recommended XAUUSD* environment, the EA will remain idle (no trading actions) and print a warning in the log.
