Exponential Moving Average
Moving average that weights recent prices more heavily than older ones. Reacts faster to price changes than the simple SMA.
Example chart
BTC/USDT · 4h · last 90 days
Loading chart data…
What is an EMA?
An Exponential Moving Average weights more recent candles exponentially more heavily than older ones. This makes it react faster to price changes than a Simple Moving Average (SMA) — at the cost of somewhat higher noise sensitivity.
Formula:
α = 2 / (n + 1)
EMA_t = α · price_t + (1 − α) · EMA_{t−1}
Typical uses
- Trend filter — the EMA-200 separates a rough uptrend from a downtrend (Peter Brandt, Stan Weinstein).
- Crossover — a fast EMA crosses a slower EMA (e.g. 5/8, 20/50) → entry signal.
- Pullback target — the EMA-20 marks the typical retracement area in uptrends (Linda Raschke, Holy Grail setup).
- Dynamic support/resistance — in trending markets the EMA is often traded like a curved trendline.
How Botty uses EMA
indicators/compute.py computes two EMAs globally: the EMA-200 (trend filter) and the EMA-20 (pullback target for Holy Grail). Strategies compute their own fast/slow EMAs for their crossovers.
Fast vs. slow EMA
Shorter periods (5–12) react fast but produce more false signals. Longer periods (50–200) filter noise but lag behind. The compromise is usually sweated out through backtests.