Overlap studies
Exponential Moving Average
Exponentially weighted moving average of closing prices.
- Engine
- TA-Lib
- Function
EMA- Input series
- close
- Outputs
- 1
How it works
EMA applies greater weight to more recent close values while retaining information from earlier bars. TA-Lib marks EMA as having an unstable period.
Use case
Use EMA when a smoother trend feature should react faster to recent price changes than a simple moving average.
Parameters
| Parameter | Type | Default | Bounds or options | Description |
|---|---|---|---|---|
| Time Period | integer | 30 | 1…100000 | Number of bars used for the EMA smoothing period. |
Outputs
| Output | Type | Description |
|---|---|---|
| EMA | number | Exponential moving average value for the bar. |
Reading the result
EMA reacts more strongly to recent observations than an equal-length simple average. This makes it useful when recent movement should influence the baseline sooner, but it also makes the line more sensitive to short-lived changes.
Because the calculation carries state forward, an earlier source revision can influence later values. Compare final rows when validating the output against another platform.
Common mistakes
- Assuming an EMA period has the same effective smoothness as an SMA period with the same number.
- Treating faster reaction as better predictive information.
- Comparing two implementations without matching initialization and warmup history.
- Ignoring that a different starting history can leave a temporary tail difference.
DataCat workflow notes
Multiple EMA instances are often used to represent several horizons. Keep the set intentional: a dense ladder of neighboring periods can increase dataset width without adding much independent information.