indicator · on price · open source

Zero-Lag EMA indicator

Zero-Lag EMA is a free open-source indicator. Zero-Lag EMA (ZLEMA) removes most of the EMA's inherent lag by adding the difference… Deepwick Script runs a subset of Pine Script.

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

What Zero-Lag EMA does

Zero-Lag EMA (ZLEMA) removes most of the EMA's inherent lag by adding the difference between price and its lag-emulated version before smoothing. Almost no lag, at the cost of slightly more overshoot.

  • Cuts the lag of a regular EMA roughly in half.
  • Lower N for very tight, almost tick-by-tick turns.
  • Combine with an ADX > 25 filter to dodge chop whipsaws.

Source code

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

//@version=6
indicator("Zero-Lag EMA", overlay=true)
len = input.int(21, "Length", minval=1, maxval=500)
src = input.source(close, "Source")
colorLight2 = input.color("color.aqua", "Color  Light2")
zlema = ta.ema(src + (src - src[math.floor((len - 1) / 2)]), len)
p_ZLEMA = plot(zlema, "ZLEMA", color=colorLight2, linewidth=2)
alertcondition(ta.crossover(close, zlema), "Price crosses above ZLEMA", "Price crossed above the ZLEMA")
alertcondition(ta.crossunder(close, zlema), "Price crosses below ZLEMA", "Price crossed below the ZLEMA")

Comments

No comments yet.

Sign in to comment.