indicator · on price · open source

Exponential Moving Average indicator

Exponential Moving Average is a free open-source indicator by @deepwick. Exponential Moving Average weights recent bars more heavily than older ones. Deepwick Script runs a subset of Pine Script.

Deepwick · @deepwickv1Updated 3 Nov 2026▲ 0 users
Running…
Loading chart…

What Exponential Moving Average does

Exponential Moving Average weights recent bars more heavily than older ones. Reacts to turns faster than an SMA at the same length and stays smooth through chop.

  • The classic 9/21 EMA crossover is a battle-hardened short-term trend signal.
  • Raise N for a steadier line, lower it for tighter, noisier response.
  • Use on any timeframe; close + 21 is the textbook default.

Source code

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

//@version=6
indicator("Exponential Moving Average", overlay=true)
len = input.int(21, "Length", minval=1, maxval=500)
src = input.source(close, "Source")
colorUp = input.color("color.green", "Color  Up")
ema = ta.ema(src, len)
p_EMA = plot(ema, "EMA", color=colorUp, linewidth=2)
alertcondition(ta.crossover(close, ema), "Price crosses above EMA", "Price crossed above the EMA")
alertcondition(ta.crossunder(close, ema), "Price crosses below EMA", "Price crossed below the EMA")

Comments

No comments yet.

Sign in to comment.