Double Exponential Moving Average

Updated: October 4, 2025

What is a Double Exponential Moving Average (DEMA)?
The double exponential moving average (DEMA) is a smoothed moving-average-type indicator designed to reduce the lag produced by traditional moving averages while retaining smoothing that filters out some price noise. It was introduced by Patrick Mulloy in 1994 and is widely used by active traders who want earlier signals than a plain exponential moving average (EMA) provides.

Key takeaways
– DEMA = 2 × EMA(N) − EMA(EMA(N)). It uses an EMA and an EMA of that EMA to reduce lag.
– DEMA is more responsive than a single EMA or simple moving average (SMA) but can generate more false signals in choppy markets.
– Common uses: trend identification, dynamic support/resistance, and crossover systems (fast DEMA crossing slow DEMA).
– Practical calculation can be done in a spreadsheet or programmatically (pandas, TradingView, etc.).
– Combine DEMA with other tools (volume, price action, momentum indicators) and risk management to reduce overtrading and false signals.

The formula
DEMA(N) = 2 × EMA_N − EMA_of(EMA_N)
where:
– N = look-back period (e.g., 20, 50)
– EMA_N = exponential moving average of price using period N
– EMA_of(EMA_N) = EMA (with same N) applied to the EMA_N series

How the EMA is calculated (recap)
EMA_today = (Price_today − EMA_yesterday) × α + EMA_yesterday
with smoothing factor α = 2 / (N + 1)

How to calculate the DEMA — step by step
1. Choose your look-back period N (e.g., 10, 20, 50).
2. Compute EMA_N of the price series:
– Seed the EMA with the simple average (SMA) of the first N prices, or use the price at the start as the initial EMA.
– Apply the EMA recursive formula using α = 2/(N+1).
3. Compute EMA_of(EMA_N):
– Treat the EMA_N series as the “price” series and apply the same EMA formula (same N and α). Seed with the first EMA_N value (or its SMA).
4. Compute DEMA for each time t:
– DEMA_t = 2 × EMA_N_t − EMA_of(EMA_N)_t

Simple numeric example (illustrative; N = 5)
– Suppose the first 5 prices have SMA (seed) = 10.0 → EMA_5 at t0 = 10.0
– α = 2/(5+1) = 0.3333
– Next price (t1) = 11.0
– EMA_5_t1 = (11 − 10)×0.3333 + 10 = 10.3333
– EMA_ofEMA (seed) = 10.0 (initial value)
– EMA_ofEMA_t1 = (EMA_5_t1 − EMA_ofEMA_prev) × α + EMA_ofEMA_prev
= (10.3333 − 10.0)×0.3333 + 10.0 = 10.1111
– DEMA_t1 = 2×10.3333 − 10.1111 ≈ 10.5555

Practical implementation: Excel / Google Sheets
– Column A: Date/time
– Column B: Price
– Column C: EMA_N
– First EMA cell (C_N) = AVERAGE(B1:BN) (seed)
– Next EMA cell: = (B_next − C_previous) * (2/(N+1)) + C_previous
– Column D: EMA_of_EMA
– Seed D_N = C_N
– Next D cell: = (C_next − D_previous) * (2/(N+1)) + D_previous
– Column E: DEMA = 2*C − D

Practical implementation: Python / pandas (concept)
– Use pandas.Series.ewm(span=N, adjust=False).mean() to compute EMA
– ema = price.ewm(span=N, adjust=False).mean()
– ema_of_ema = ema.ewm(span=N, adjust=False).mean()
– dema = 2 * ema − ema_of_ema

What DEMA tells you (interpretation)
– Trend direction: If price is above a rising DEMA, that supports an uptrend. Price below a falling DEMA supports a downtrend.
– Momentum/strength: The slope of the DEMA shows how quickly price is moving. A steeply rising DEMA indicates strong upward momentum.
– Crossovers: Use two DEMAs (shorter and longer N). A bullish signal is when shorter-period DEMA crosses above longer-period DEMA; bearish when it crosses below.
– Support/resistance: Like many moving averages, DEMA can act as dynamic support or resistance, but its reliability should be verified historically for the specific asset and timeframe.

Who uses DEMA and why
– Day traders and swing traders who want earlier signals with smoothing.
– Traders who want reduced lag compared with a single EMA but still want smoothing (DEMA offers earlier reaction to price changes).
– Long-term investors generally prefer longer-term SMAs/EMAs (50, 100, 200) because longer averages reduce noise and false signals.

How to read and trade with DEMA — practical steps and rules
1. Choose timeframes consistent with your trading style (e.g., 5–60 min for day trading, daily for swing trades).
2. Choose periods: common short/long pairs: 10 & 50, 20 & 50. Adjust based on backtest results.
3. Basic DEMA rules:
– Entry long: Price > DEMA and DEMA is rising, or short-DEMA crosses above long-DEMA.
– Exit long: Price falls below DEMA, or short-DEMA crosses below long-DEMA.
4. Confirm with secondary tools:
– Volume increase on breakouts, momentum indicators (RSI, MACD), or price action (higher highs/lows).
5. Use risk management:
– Position sizing, stop-loss (below recent swing low or a multiple of ATR), and profit targets.
6. Avoid trading in sideways/choppy markets — DEMAs produce many whipsaws when price lacks trend.

DEMA and MACD (MACD DEMA)
– Classic MACD = EMA(12) − EMA(26), with a signal line (usually EMA(9) of the MACD).
– Some traders substitute DEMAs: MACD_DEMA = DEMA(12) − DEMA(26), or compute MACD on DEMAs or use DEMA as the signal smoothing. This can make the MACD more responsive (earlier momentum signals), but also increase sensitivity to noise.
– Practical tip: Backtest any MACD/DEMA combination before live trading to assess false-signal rate and trade outcomes.

DEMA vs. TEMA vs. EMA vs. SMA
– SMA: simple average; smooth but lags more as N grows.
– EMA: gives more weight to recent prices, reduces lag vs SMA.
– DEMA: reduces EMA lag further by subtracting an EMA-of-EMA; more responsive than EMA.
– TEMA (triple EMA): uses EMA, EMA-of-EMA, EMA-of-EMA-of-EMA in a formula to reduce lag even more than DEMA.
– Tradeoff: lower lag → faster signals but more false signals; higher smoothing → fewer false signals but later signals.

What is the most accurate moving average?
– There is no single “most accurate” moving average for all situations. Accuracy depends on:
– Timeframe
– Asset volatility and behavior
– The trader’s objective (early signals vs fewer false signals)
– Longer periods tend to be more reliable for defining major trends; shorter periods better for quicker signals. Backtesting is essential to determine which MA performs best in your strategy.

Limitations and cautions
– More responsive moving averages (DEMA/TEMA) produce more signals and therefore more false signals in range-bound markets.
– DEMA requires more computational steps and therefore more historical data than a single EMA.
– A moving-average signal alone is rarely sufficient. Use confirmation from volume, price structure, or other indicators.
– Overfitting risk: optimizing N on historical data can produce parameters that don’t generalize out-of-sample.

Practical tips and checklist before using DEMA live
– Backtest the chosen DEMA periods and crossover rules on historical data for your instrument and timeframe.
– Verify whether DEMA historically acted as support/resistance for that asset and timeframe if you plan to use it this way.
– Combine DEMA signals with at least one independent confirmation (momentum, volume, higher-timeframe trend).
– Use stop-losses, define risk per trade, and avoid increasing frequency of trades solely because the indicator is faster.

Sources and further reading
– Investopedia: “Double Exponential Moving Average (DEMA)” — https://www.investopedia.com/terms/d/double-exponential-moving-average.asp
– Mulloy, Patrick. “Smoothing Data With Faster Moving Averages,” Technical Analysis of Stocks & Commodities, 1994.
– TradingView community examples: “DEMA Strategy with MACD” (community scripts and strategies)

Summary
DEMA is a faster, smoothed moving-average tool created to reduce lag and give earlier signals than a standard EMA. It’s useful for active traders wanting quicker trend identification but requires careful confirmation and risk management to avoid overtrading and whipsaws. Calculate it as DEMA = 2×EMA − EMA(EMA), and implement it in spreadsheets or code using the EMA recursive formula. Always backtest and combine with other analysis methods before trading live.