EMA — Exponential Moving Average

What it measures: Trend direction, weighting recent bars more heavily

When to use it: Trend-following: price above EMA = uptrend bias; fast EMA crossing slow EMA = trend-change signal. On XAUUSD, stacking 20/50/200 to confirm trend is common

Typical period: 20 (fast) / 50 (mid) / 200 (macro structure)

Caution: Whipsaws in sideways markets — filter with ADX or HTF trend before using a cross as a trigger

Formula the engine actually uses

close.ewm(span=period, adjust=False).mean()

smoothing: EMA (exponential, span-based) · warmup: ~3×period