Appearance
Hull Moving Average
Hull: WMA of 2 x WMA(n/2) minus WMA(n), fast and smooth.
Kind indicator · Drawn on the price pane
Try it
On the chart, press / and choose Hull Moving Average under Moving averages. To change it, copy the source below into the AlphaScript editor.
Inputs
| Input | Type | Default |
|---|---|---|
| Length | int | 9 |
| Source | source | "close" |
| Color | color | "#2962FF" |
Source
From packages/alphascript/indicators/hma.as.js.
js
indicator({ name: "Hull Moving Average", shortTitle: "HMA", overlay: true });
const length = input.int("Length", 9, { min: 1 });
const src = input.source("Source", "close");
plot(ta.hma(src, length), { title: "HMA", color: input.color("Color", "#2962FF", { group: "Style" }) });