# XAUUSD M15 Trend-Pullback EA

Trades gold on the 15-minute chart, entering in the direction of the higher-timeframe trend, waiting for a pullback into a fast EMA, and exiting based on RSI and ATR.

Canonical: https://prismaticalgos.com/compendium/algo/11590-xauusd-m15-trend-pullback-ea
Record ID: 11590
Catalog rank: 96 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Mean Reversion & Counter-Trend (B)
Source: https://github.com/srpo93/XAUUSD-bot
Evidence label (unverified): source_code

## 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: 07:00-16:00 (London) 13:00-20:00 (New York)
- market_regime: trending

## Indicators

- EMA: {"period": 200}; applied to: close
- EMA: {"period": 21}; applied to: close
- EMA: {"period": 50}; applied to: close
- RSI: {"period": 14}; applied to: close
- ATR: {"period": 14}; applied to: close

## Recorded long-entry rules

- H1 close > H1 EMA(200) and H1 EMA(200) rising over the last 5 bars
- M15 close > M15 EMA(21)
- bullish bar closing back above the fast EMA with RSI back at or above 50

## Recorded short-entry rules

- H1 close < H1 EMA(200) and H1 EMA(200) falling over the last 5 bars
- M15 close < M15 EMA(21)
- bearish bar closing back below the fast EMA with RSI at or below 50

## Recorded exit rules

- Stop loss = InpAtrSlMultiplier x ATR(14), widened if broker's stop level or current spread demands it
- Take profit = stop distance x InpRewardRatio
- Breakeven: at InpBreakevenTriggerR the stop moves to entry plus InpBreakevenOffsetR of locked profit
- ATR trailing: once price reaches InpTrailStartR, the stop trails InpTrailAtrMult ATRs behind the current price, updating only when it improves by at least InpTrailStepPoints
- Partial close: at InpPartialTriggerR, InpPartialPercent of the original volume is closed once

## Recorded filters

- news filter
- max spread 60 points
- price is more than InpMaxEntryDistAtr ATRs away from the fast EMA

## Risk controls

- Stop loss: InpAtrSlMultiplier x ATR(14), widened if broker's stop level or current spread demands it
- Take profit: stop distance x InpRewardRatio
- Position sizing: Lot size is solved so a full stop-out costs InpRiskPercent of account equity, using the symbol's tick value, then clipped to the volume step, min/max lot, and available free margin
