indicator · on price · open source

Triple Exponential Moving Average

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Triple EMA (TEMA) applies three EMAs and combines them so the lag of the first two is removed from the third. Even tighter turns than DEMA at the same length — a staple of low-lag trading systems.

  • Faster than DEMA, much faster than a plain EMA.
  • Lower N for very tight turn detection; raise N to keep the noise under wraps.

Source code

//@version=5
indicator("Triple Exponential Moving Average", overlay=true)
len = input.int(20, "Length", minval=1, maxval=500)
src = input.source("close", "Source")
e1 = ta.ema(src, len)
e2 = ta.ema(e1, len)
e3 = ta.ema(e2, len)
tema = 3 * e1 - 3 * e2 + e3
p_TEMA = plot(tema, "TEMA", color=color.fuchsia, linewidth=2)
alertcondition(ta.crossover(close, tema), "Price crosses above TEMA", "Price crossed above the TEMA")
alertcondition(ta.crossunder(close, tema), "Price crosses below TEMA", "Price crossed below the TEMA")

Comments

No comments yet.

Sign in to comment.