Lipi Reference Lipi

Functions

talib.hma()

Hull moving average of `source` over `length` bars.

Syntax

                talib.hma(series float source, series int length) → series float
              

Arguments

source required series float The series to average.
length required series int How many bars the average covers.

Return Type

series float

Example


          indicator("HMA Example", overlay=true)
// Define input source and period
src = close
length = 20
// Compute Hull Moving Average
hma_line = talib.hma(src, length)
// Plot the HMA
plot(hma_line, title="HMA 20", color=color.blue)