indicator · on price · open source

Hull Moving Average indicator

Hull Moving Average is a free open-source indicator by @deepwick. Hull Moving Average combines two WMAs of half and full length, then smooths the difference… Deepwick Script runs a subset of Pine Script.

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

What Hull Moving Average does

Hull Moving Average combines two WMAs of half and full length, then smooths the difference through a third WMA of sqrt(N). The result is very smooth with dramatically lower lag than an SMA at the same length.

  • Excellent swing-line on crypto and indices where lag kills the entry.
  • Default 20 looks like an SMA 14 but turns ~3 bars sooner.
  • Pair with a slower MA for a non-trendline HMA crossover.

Source code

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

//@version=6
indicator("Hull Moving Average", overlay=true)
len = input.int(20, "Length", minval=2, maxval=500)
src = input.source(close, "Source")
colorBg = input.color("color.purple", "Color  Bg")
hma = ta.wma(2 * ta.wma(src, len / 2) - ta.wma(src, len), math.round(math.sqrt(len)))
p_HMA = plot(hma, "HMA", color=colorBg, linewidth=2)
alertcondition(ta.crossover(close, hma), "Price crosses above HMA", "Price crossed above the HMA")
alertcondition(ta.crossunder(close, hma), "Price crosses below HMA", "Price crossed below the HMA")

Comments

No comments yet.

Sign in to comment.