Functions
talib.alma()
An Arnaud Legoux moving average of `source` over `length` bars. Two further arguments, `offset` and `sigma`, shape the weighting. Both accept an int or a float.
Syntax
talib.alma(series float source, series int length, series float offset, series float sigma) → series float
Arguments
source required series float The series to average. length required series int How many bars the window covers. An int. offset required series float Shape argument of the weighting. Int or float. sigma required series float Second shape argument of the weighting. Int or float. Return Type
series float Example
indicator("ALMA vs EMA", overlay=true)
length = input(20, title="Moving Average Length")
almaLine = ta.alma(close, length, 0.85, 6)
emaLine = ta.ema(close, length)
plot(almaLine, color=color.blue, title="ALMA", linewidth=2)
plot(emaLine, color=color.red, title="EMA", linewidth=2)