GoldTrendATR
- Experts
- Version: 2.0
GoldTrend ATR is a trend-following Expert Advisor for Gold (XAUUSD), designed to be simple to run and strict on risk. It is offered for free: feedback and reviews are welcome.
How it trades
- Trend direction from two EMAs (default 20/50) on the signal timeframe (default M30).
- Entry only when RSI crosses its midline in the direction of the trend, on a closed bar.
- Optional tick-volume filter: the signal bar must show above-average activity.
- Every trade opens with a Stop Loss and Take Profit based on ATR (default 1.5x / 2.2x ATR).
- Optional ATR trailing stop to protect profits once the trade moves in your favour.
Risk management
- Lot size calculated from a % of equity for every trade (default 0.4%).
- Combined risk cap across all open positions (default 2% of equity).
- Maximum number of simultaneous positions (default 3).
- Margin check before every order; trades are skipped if margin is not sufficient.
- No grid, no martingale, no averaging down. Each position comes from a fresh signal.
- Spread filter to avoid trading in abnormal conditions.
Backtest (shown in the screenshots)
XAUUSD M30, 2026.01.01 - 2026.10.15, every tick, 10,000 USD, default inputs: 111 trades, net profit +45.40 USD, profit factor 1.03, max equity drawdown 2.90%. The default settings are conservative and roughly break-even in this period: use the inputs and the Strategy Tester to adapt the EA to your broker and risk profile.
Recommended setup
- Symbol: XAUUSD (Gold). The EA uses the timeframe set in the inputs (M30 by default), regardless of the chart timeframe.
- Broker with low spread on Gold; a VPS is recommended for continuous operation.
- With default risk settings the EA skips trades that would require more risk than allowed (e.g. if the broker's minimum lot is too large for the account).
Inputs
- Risk management: risk per trade %, max risk per single trade %, max combined risk %, max simultaneous positions, share of free margin to use, allow minimum lot override.
- Trend (EMA): fast and slow EMA periods.
- Momentum (RSI): RSI period and midline.
- Stop Loss / Take Profit (ATR): ATR period, SL and TP multipliers.
- Volume filter: on/off, average period, multiplier.
- Operations: max spread (points), ATR trailing stop on/off and distance, signal timeframe, magic number, order comment.
Important
Trading involves substantial risk. Past results, backtests included, do not guarantee future performance. Test the EA on a demo account and in the Strategy Tester with your broker's data before trading live.
