EMA vs SMA
A Simple Moving Average weights all bars equally. An EMA applies a smoothing factor giving the most recent bar the highest weight, declining exponentially for older bars.
At period 20, the most recent bar gets roughly 9.5% weight; the bar 20 periods ago gets roughly 1.4% weight. This means the EMA reacts faster to price changes.
Use in EA trend filters
EMA crossover systems (fast EMA crossing above slow EMA = bullish trend) are among the most common EA entry logic structures. They are simple, robust, and well-documented. The trade-off is more frequent false signals in ranging markets.
Periods in common use
- EMA 8/21 — short-term trend detection
- EMA 50/200 — medium-to-long term trend (golden cross / death cross)
- EMA 5/13/34 — triple EMA systems