# XAUUSD Trend-Following System

A long-only, trend-following strategy for XAUUSD with ATR-based stop and target, and daily loss circuit breaker.

Canonical: https://prismaticalgos.com/compendium/algo/11226-xauusd-trend-following-system
Record ID: 11226
Catalog rank: 796 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Risk, Money Management & Portfolio Overlays (J)
Source: https://github.com/maker-tung/xauusd-trend-follow
Evidence label (unverified): backtest_shown

## Scope and limitations

These are machine-extracted research records, not verified trading systems. Catalog rank measures specification detail and claimed evidence, not profitability. The catalog extraction pipeline did not independently backtest these records. Its separate selected testing ledger does not validate the wider corpus. Rules, labels and parameters can be incomplete or wrong; consult the original source and its reuse terms.

No endorsement, ownership claim or source-code reuse permission is implied.

## Extraction warnings

No automated warnings recorded; this is not validation.

## Recorded profile

- symbols: XAUUSD
- timeframes: H1
- sessions: London open 08:00-11:00 GMT
- market_regime: trending

## Indicators

- EMA: {"period": 200}; applied to: close
- ADX: {"period": 14}; applied to: close
- MACD: {}; applied to: close
- Stochastic: {"period": 14}; applied to: close

## Recorded long-entry rules

- Price[close, shift=1] > EMA(200)[shift=1]
- ADX(14)[shift=1] >= 20.0
- MACD_Line[1] > Signal_Line[1] AND MACD_Line[2] <= Signal_Line[2]
- %K[1] > %D[1] AND %K[2] <= %D[2] AND %K[1] < InpStoch_MaxLevel
- EMA(9)[1] > EMA(21)[1] AND EMA(9)[2] <= EMA(21)[2]

## Recorded short-entry rules

- Not specified.

## Recorded exit rules

- ManageOpenPositions()
- IsNewBar()

## Recorded filters

- news filter
- max spread 0.30 pips
- daily loss limit 4.0%
- max drawdown limit 8.0%

## Risk controls

- Stop loss: Ask - (InpSL_ATR × ATR[1])
- Take profit: Ask + (InpTP_ATR × ATR[1])
- Position sizing: Risk Money = Account Balance × (InpRiskPercent / 100); Loss Per Lot = (SL Distance / Tick Size) × Tick Value; Lot Size = Risk Money / Loss Per Lot
