Skip to content
Algo Trade Analytics Docs

ta.hma() - Pine Script Function

The hma function returns the Hull Moving Average.

ta.hma(source, length) → series float
NameTypeDescription
sourceseries int/floatSeries of values to process.

Hull moving average of ‘source’ for ‘length’ bars back.

  • na values in the source series are ignored.
//@version=6
indicator("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)