Exponential moving average
The average of recent closes, weighted toward the newest bars, drawn over the candles to show the trend.
The EMA keeps a running average of the close, updated on every bar. The new close gets a weight of 2 / (window + 1) and the previous average keeps the rest, so older bars fade out gradually rather than dropping off at a cutoff. The first close seeds the average, so the line starts there with no warm-up period.
How to read it
- The line sits on the price scale, drawn over the candles.
- Price above the line means recent closes are running above the average; below means they are running under it.
- A steep slope means the average is moving fast; a flat line means price has been hovering near its average.
What it outputs
- EMA
- Exponential moving average of the close, on the same scale as the candles.
Settings
- Window
- Sets how far back the average reaches: each new bar gets weight 2 / (window + 1), so 20 gives about 9.5 percent. Raising it smooths the line and slows its turns; lowering it hugs the candles and bends at every small wiggle.
Pitfalls
- The first close seeds the average with no warm-up, so the earliest part of the chart lags price until that starting value fades.
- On SPY one-minute bars in September 2026 with the default window, the median EMA sat within 0.001 percent of the median close, so it mostly overlays price rather than separating from it.
- An EMA is a lagging smoothing of price, not a signal on its own; a crossing or slope change only means something alongside the trend context around it.