Skip to content

DEMA

Indicators · Moving Averages

DEMA node on the canvas

Double Exponential Moving Average — reduced-lag EMA variant.

The DEMA (Double Exponential Moving Average) is an EMA with most of the lag engineered out. A normal moving average always trails price because it's built from old data; the DEMA cleverly estimates that lag and subtracts it, so the line tracks price more closely and turns sooner. You get a trend line that feels "quicker" than an EMA of the same length without simply shortening the period and inviting noise.

How it works

Despite the name, DEMA isn't an average of an average — that would add lag. Instead it computes 2 × EMA − EMA(EMA) over the Period. The single-smoothed EMA lags price; the double-smoothed EMA lags it roughly twice as much; doubling the first and subtracting the second cancels most of the lag and leaves a responsive line. The Source (default close) feeds the calculation, or you can wire any series in to smooth that instead. The one output draws on the price pane in your Line color.

When to use it

Reach for a DEMA when EMA lag is costing you entries but you don't want the extra chop of a much shorter period — shorter-term and swing trend systems benefit most. It's a near drop-in replacement anywhere you'd use an EMA. The cost of responsiveness is overshoot: in sharp reversals the lag-cancellation can make the line briefly poke past price, so it's a touch more prone to false turns than a plain EMA.

Example

DEMA on the EURUSD H1 chart

DEMA on EURUSD · H1

Swap a DEMA in for a faster trend read: wire bars into a Period 20 and a Period 50 DEMA, feed both to a Crosses Above for the entry, and route to a Buy Signal. Confirm the regime with ADX / DMI so the quicker line doesn't whip you in ranges, then backtest in the Tester.

Tips & gotchas

  • Faster than EMA, slightly twitchier. That's the trade — less lag for a little more overshoot.
  • Even less lag? Use TEMA. It applies the same trick a step further. Want maximum smoothness instead? Go back to SMA/EMA.
  • Overshoot in reversals can fire early signals — pair crosses with a confirmation filter.
  • Keep sources matched across any two DEMAs you compare.

Inputs

Socket Type What to wire in
Source bars / series Price bars or any indicator series

Outputs

Output Type Plots as Description
DEMA series Line Double EMA

Parameters

Parameter Type Default What it does
Period number · 2–500 20
Source choice (close, open, high, low, hl2, hlc3, ohlc4) close
Line color colour #81c784

Reference auto-generated from the block catalog · category Indicators.