DEMA
Summary
Double Exponential Moving Average: an EMA combined with an EMA-of-EMA to reduce lag versus a plain EMA. Overlap Studies overlay on price.
Formula
EMA1 = EMA(inReal, period); EMA2 = EMA(EMA1, period); DEMA = 2*EMA1 - EMA2
Notes
- A period of 1 performs no smoothing: the output is a copy of the input. Allowed since 0.6.5 (issues #48/#59).
Inputs
inReal— Source series (typically price)
Outputs
outReal— DEMA line
Parameters
optInTimePeriod— Smoothing period for both EMA passes
Implementation
TA-Lib Definition: dema.c · dema.yaml
| Native | File |
|---|---|
| C | ta_DEMA.c |
| Rust | dema.rs |
| Java | Core.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Double Exponential Moving Average