indicator · on price · open source

Double Exponential Moving Average indicator

Double Exponential Moving Average is a free open-source indicator. Double EMA (DEMA) subtracts a double-smoothed EMA from a doubled single EMA to cancel out… Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What Double Exponential Moving Average does

Double EMA (DEMA) subtracts a double-smoothed EMA from a doubled single EMA to cancel out the inherent EMA lag. Faster turns than a comparable EMA with the same smoothing length.

  • Use DEMA where lag is hurting a fast EMA crossover.
  • Raise N for steadier lines; lower it for snappy turn detection.
  • Adds noise in chop — pair with an ADX filter.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("Double Exponential Moving Average", overlay=true)
len = input.int(20, "Length", minval=1, maxval=500)
src = input.source(close, "Source")
colorDown = input.color("color.red", "Color  Down")
e1 = ta.ema(src, len)
e2 = ta.ema(e1, len)
dema = 2 * e1 - e2
p_DEMA = plot(dema, "DEMA", color=colorDown, linewidth=2)
alertcondition(ta.crossover(close, dema), "Price crosses above DEMA", "Price crossed above the DEMA")
alertcondition(ta.crossunder(close, dema), "Price crosses below DEMA", "Price crossed below the DEMA")

Comments

No comments yet.

Sign in to comment.