P
PipsGrowth

Key Takeaways

Difficulty:Intermediate
Reliability:High
Category:trend
Timeframes:15M, 1H, 4H

Double Exponential Moving Average (DEMA)

trendšŸ“Š 15M, 1H, 4H, Daily

A faster, smoother moving average that reduces lag by applying EMA twice.

Formula

Code
DEMA = 2 Ɨ EMA(n) - EMA(EMA(n))

Detailed Explanation

DEMA was developed by Patrick Mulloy to reduce the lag inherent in traditional moving averages.

**How It Works:** - Applies EMA twice - Formula subtracts the double-smoothed from double the single EMA - Results in faster response to price changes

Parameters

Period
Default: 20
DEMA calculation period

šŸ“ˆ Bullish Signals

Price crosses above DEMA, DEMA slopes upward

šŸ“‰ Bearish Signals

Price crosses below DEMA, DEMA slopes downward

Python Implementation

DEMA calculation

Python
import pandas_ta as ta
df['DEMA'] = ta.dema(df['close'], length=20)

TradingView Pine Script

JavaScript
//@version=5
indicator("DEMA", overlay=true)
dema = ta.dema(close, 20)
plot(dema, "DEMA", color=color.blue)
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
int dema_handle = iDEMA(_Symbol, _Period, 20, 0, PRICE_CLOSE);
double dema[];
CopyBuffer(dema_handle, 0, 0, 3, dema);

Common Mistakes

āœ—Using in choppy markets
āœ—Not combining with trend filters

Confirmation Signals

Price action
Volume
Other MAs

Best For

Fast trend detectionReduced lag signalsCrossover strategies

šŸ’” Pro Tips

  • •Less lag than EMA but more sensitive
  • •Good for trending markets
  • •Combine with slower MAs for confirmation
Last updated: December 29, 2024

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions