Overlap studies
Double Exponential Moving Average
Low-lag moving average combining one- and two-stage exponential smoothing.
- Engine
- TA-Lib
- Function
DEMA- Input series
- close
- Outputs
- 1
How it works
DEMA calculates an EMA of the close and an EMA of that EMA, then combines them as 2*EMA1 - EMA2 to reduce lag without applying a double exponential smoothing factor.
Use case
Use DEMA as a responsive trend feature for smoothing, crossovers, and earlier directional-change detection than a conventional EMA.
Parameters
| Parameter | Type | Default | Bounds or options | Description |
|---|---|---|---|---|
| Time Period | integer | 30 | 1…100000 | Period used by both sequential EMA stages in the DEMA calculation. |
Outputs
| Output | Type | Description |
|---|---|---|
| DEMA | number | Double Exponential Moving Average value for the bar. |
Reading the result
DEMA combines exponential smoothing stages to reduce part of the lag found in a conventional EMA. The result remains a price-level baseline, but it can respond more sharply to recent movement.
Reduced lag is a trade-off rather than a free improvement: faster response can increase sensitivity to noise and short-lived reversals.
Common mistakes
- Reading the name as two independent EMA outputs.
- Assuming lower lag always improves a model.
- Comparing early values from datasets with different initialization history.
- Treating DEMA and TEMA as interchangeable.
DataCat workflow notes
Evaluate DEMA beside a simpler baseline using the same source rows and downstream target. If both provide nearly identical information, prefer the smaller and easier-to-explain feature set.