Gold Trend Engine
Gold Trend Engine
Gold Trend Engine is a conservative trend-following Expert Advisor for XAUUSD (Gold) on the H4 timeframe, developed by AutoProfit FX. It follows established gold trends using channel breakout signals combined with staged profit-taking. It does not use martingale, grid, scalping, or arbitrage, and every trade carries a stop loss. The design priority is capital preservation, which is reflected in a low backtested drawdown.
How it works
The EA identifies channel breakouts within established trend conditions and confirms them with a multi-period trend validation before any entry. Profit-taking is staged, with partial closes at predefined levels. After the first target is reached, the stop is moved to protect gains, and a trailing stop manages the remaining position. The EA holds a single position at a time and trades long, following the trend.
Risk management
Risk per trade is 1.0% by default. The stop loss is dynamic and based on ATR. Position management is staged: the stop moves to breakeven after the first target, and a trailing stop activates after the second target. The approach is built for stable, low-volatility growth rather than maximum return.
Backtest results
Backtested on XAUUSD H4 from 2018 to 2026, with a starting balance of 10,000 USD, using the Every Tick Based on Real Ticks model:
Net Profit: 2,469 USD
Profit Factor: 1.68
Maximum Drawdown: 5.60%
Win Rate: 51%
Total Trades: 142
Recovery Factor: 4.41
These are backtest results, not live trading results. This is a conservative system, so expect modest and stable returns rather than large gains. Past performance does not guarantee future results.
Who it is for
This EA suits conservative traders who prioritise low drawdown over high returns, newer algorithmic traders looking for an accessible starting point, and those who want gold exposure with controlled risk as part of a diversified portfolio. It is not designed for maximum return; it is designed for discipline and capital preservation.
Key parameters
Engine_Sensitivity sets the channel breakout period. Trend_FastPeriod and Trend_SlowPeriod control the multi-period trend filter, and UseTrendValidation enables trend confirmation. RiskPercent sets the risk per trade. Risk_StopMultiplier sets the stop distance in ATR units. PartialTP1_RR and PartialTP2_RR set the staged profit targets, while PartialTP1_Pct and PartialTP2_Pct set the percentage closed at each target. MoveStopAfterTP1 moves the stop to breakeven after the first target, TrailAfterTP2 enables the trailing stop after the second target, and Risk_TrailMultiplier sets the trailing distance.
Requirements
Symbol: XAUUSD. Timeframe: H4. Account type: ECN or RAW spread preferred. Leverage: 1:100 or higher. Minimum deposit: 500 USD, with 2,000 USD or more recommended. A VPS is recommended for uninterrupted operation.
Installation
Attach Gold Trend Engine to a XAUUSD H4 chart and enable automated trading. The default settings are ready to use. Running on a VPS is recommended for uninterrupted operation.
Support
For questions or setup help, please use the comments section of this product or the MQL5 messaging system. All support is provided through MQL5.
Disclaimer
Trading gold and CFDs on margin carries a high level of risk and may not be suitable for all investors. Leverage can work against you as well as for