Concept

DEMA

DEMA is a Trend concept. The Library holds 4 implementations, each one a working definition you can pull into Quant.

Top DEMA indicators

4 total

What is DEMA?

DEMA, the double exponential moving average introduced by Patrick Mulloy in 1994, is a lag-reduced average rather than an average applied twice. The formula is DEMA = 2 × EMA − EMA(EMA): take the EMA of price, take a second EMA of that EMA, and combine. The gap between the single and double-smoothed EMA estimates how far the EMA trails its own input; the combination adds that gap back onto the single EMA, pulling the line closer to current price while keeping most of the smoothing.

The trade-off is the usual one for lag reduction. A DEMA of a given length turns with price sooner than the same-length EMA, but the correction term amplifies whatever price just did, so it overshoots at sharp reversals and whipsaws more readily in chop. It sits one rung below TEMA on the lag-versus-stability ladder: responsive enough to matter, stable enough to still read as a trend line.

How to calculate DEMA

Two EMA passes and one combination produce it:

  1. 1Compute EMA1 = EMA of price with the chosen length N.
  2. 2Compute EMA2 = EMA of EMA1 with the same length, a double-smoothed and therefore slower line.
  3. 3Combine: DEMA = 2 × EMA1 − EMA2. The subtraction cancels a large part of the single EMA's lag.
  4. 4Plot and read like any moving average, remembering the effective smoothing is lighter than the stated length suggests.

How traders use it

  • As a lower-lag trend filter: price above a rising DEMA, below a falling one, with the reduced lag surfacing regime turns a few bars earlier than the equivalent EMA and, in exchange, producing more false turns in ranges.
  • In crossover systems: fast/slow DEMA pairs or price-DEMA crosses fire earlier than their EMA counterparts; the extra signals need a trend, volatility, or structure filter to be tradable.
  • As the smoothing engine inside other tools: a MACD or Supertrend computed on DEMA inherits the earlier turn, a common way builders tune a parent indicator's responsiveness without changing its logic.
  • As a trailing reference in fast trends, where a standard EMA of comparable smoothness trails too far behind price to act as a useful dynamic level.

DEMA vs neighboring moving averages

EMA: The building block. A same-length EMA is smoother but trails turning price further; DEMA subtracts an estimate of that lag, buying earlier turns at the cost of overshoot.

TEMA: One more level of the same idea: three EMA stages combined as 3 × EMA − 3 × EMA(EMA) + EMA(EMA(EMA)). Less lag again, more whip again; DEMA is the middle rung.

ZLEMA: Also lag-reduced, but by momentum-correcting the input (price plus its change over roughly half the length) before a single EMA, rather than combining two EMA stages after smoothing.

More DEMA implementations

Related concepts · Moving-average lineage

Concept family

Trend

100 concepts mapped · 88 in the Library

DEMA FAQ

Is DEMA just an EMA applied twice?

No. An EMA of an EMA is smoother and slower than the original. DEMA uses that double-smoothed series the opposite way: it subtracts it from twice the single EMA, treating the gap between the two as a lag estimate and adding it back. The result is faster than the plain EMA, not slower, which is the entire point of Mulloy's construction.

Is DEMA better than EMA?

It is faster, not better. For the same length DEMA hugs price more closely and flags turns earlier, but it overshoots sharp reversals and generates more whipsaw in sideways markets. Which side of that trade-off helps depends on the strategy; lag reduction is a property, not an edge, and no moving-average variant guarantees improved results.

What length should a DEMA use?

There is no canonical setting. Traders commonly reuse familiar EMA lengths, but because DEMA cancels much of the lag, it behaves roughly like a shorter EMA; some lengthen it to recover smoothness. Match the length to the swing duration being traded and test it rather than trusting a default.

Build DEMA your way.

Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.