indicator · on price · open source

Weighted Moving Average indicator

Weighted Moving Average is a free open-source indicator. Weighted Moving Average applies a linear weighting to the lookback window so the most… Deepwick Script runs a subset of Pine Script.

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

What Weighted Moving Average does

Weighted Moving Average applies a linear weighting to the lookback window so the most recent bar has the heaviest weight and the oldest the lightest.

  • More responsive than an SMA at the same length, less than an EMA.
  • Useful when you want the line to react to the latest print faster than an SMA but stay less jittery than an EMA.
  • Raise N for smoother swings; lower it for tighter tracking.

Source code

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

//@version=6
indicator("Weighted Moving Average", overlay=true)
len = input.int(20, "Length", minval=1, maxval=500)
src = input.source(close, "Source")
colorMid = input.color("color.orange", "Color  Mid")
wma = ta.wma(src, len)
p_WMA = plot(wma, "WMA", color=colorMid, linewidth=2)
alertcondition(ta.crossover(close, wma), "Price crosses above WMA", "Price crossed above the WMA")
alertcondition(ta.crossunder(close, wma), "Price crosses below WMA", "Price crossed below the WMA")

Comments

No comments yet.

Sign in to comment.