ta.hma() - Pine Script Function
ta.hma()
Section titled “ta.hma()”Overview
Section titled “Overview”The hma function returns the Hull Moving Average.
Syntax
Section titled “Syntax”ta.hma(source, length) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| source | series int/float | Series of values to process. |
Returns
Section titled “Returns”Hull moving average of ‘source’ for ‘length’ bars back.
Remarks
Section titled “Remarks”- na values in the source series are ignored.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("Hull Moving Average")src = input(defval=close, title="Source")length = input(defval=9, title="Length")hmaBuildIn = ta.hma(src, length)plot(hmaBuildIn, title="Hull MA", color=#674EA7)