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 Series of values to process. length required series int Number of bars (length). offset required series float Controls tradeoff between smoothness (closer to 1) and responsiveness (closer to 0). sigma required series float Changes the smoothness of ALMA. The larger sigma the smoother ALMA. Return Type
series float Example
//@lipi=2
indicator("ALMA vs EMA", overlay=true)
length = input(20, title="Moving Average Length")
almaLine = talib.alma(close, length, 0.85, 6)
emaLine = talib.ema(close, length)
plot(almaLine, color=color.blue, title="ALMA", linewidth=2)
plot(emaLine, color=color.red, title="EMA", linewidth=2)