> *ZLDEMA combines the speed of zero-lag prediction with the smoothness of double exponential averaging. You get faster response than ZLEMA, with better trend-following than DEMA.*
## DEMA with lag compensation via a zero-lag signal
ZLDEMA takes a standard DEMA and feeds it a **zero-lag signal**: current price minus a lagged price. This produces a smoother that responds faster than DEMA without going fully raw. The dual EMA cascade provides additional noise rejection while the zero-lag preprocessing maintains responsiveness.
## Historical Context
ZLDEMA extends the zero-lag concept from ZLEMA to double exponential moving averages. Where ZLEMA applies lag compensation to a single EMA, ZLDEMA applies it to a two-stage EMA cascade using the DEMA formula (2*EMA1 - EMA2). This combination targets the middle ground between ZLEMA's speed and TEMA's smoothness.
The zero-lag signal is a forward estimate, and the DEMA formula (2*EMA1 - EMA2) further amplifies deviations. Expect more overshoot than ZLEMA when price reverses sharply.
2.**Period semantics**
ZLDEMA uses EMA alpha; the lag term is derived from period but not equivalent to a window length. Do not compare ZLDEMA period directly to SMA window length.
3.**Warmup discipline**
Use `IsHot` / `WarmupPeriod` before acting on signals. Early values are bias-corrected but still unstable. The dual EMA cascade requires longer warmup than single-stage ZLEMA.
4.**Non-finite data**
NaN or Infinity is replaced with the last valid value. Before the first valid sample, output is `NaN`.
ZLDEMA is not simply DEMA with a different alpha. The zero-lag preprocessing fundamentally changes the input signal, making ZLDEMA more responsive but also more prone to overshoot than standard DEMA.