An exponential moving average (EMA) is a trend-following average that gives more weight to recent prices. It reacts faster than a simple moving average (SMA) to new market moves.
Formula
α = 2 / (N + 1)
EMA_t = α × Close_t + (1 − α) × EMA_{t−1}
The first value is often seeded with SMA_N, then updated each bar.
Typical settings
| Use case | Period range |
|---|---|
| Fast trend / crossover short leg | 5–20 |
| Medium trend | 20–50 |
| Slow trend / crossover long leg | 50–200 |
How traders use EMA
- Trend direction — Price above EMA suggests bullish bias; below suggests bearish bias.
- Crossovers — A faster EMA crossing above a slower EMA is a classic bullish signal (and the reverse for bearish).
- Dynamic support/resistance — Pullbacks to the EMA in a trend can act as entry zones.
In dogabot
dogabot’s strategy engine uses EMA for:
- MA Crossover — short vs long EMA
- Moving Average — price vs a single EMA
- Price Distance — band around an EMA
Example
On a BTC/USDT 1h chart, the 20-period EMA is at $96,500 and the last close is $97,200 (price above the line). In a Moving Average rule with period 20, that bar contributes a buy bias. If the 5-period EMA crosses above the 100-period EMA on the same chart, a MA Crossover rule would also lean buy.