alma

alma(series, period, offset, sigma)
Parameters
  • series (series) – Input series.

  • period (integer) – MA Period.

  • offset (numeric) – Gaussian Distribution mean value. Controls responsiveness of the filter, where 0 is the least responsive and 1 is the most responsive

  • sigma (numeric) – Gaussian Distribution standard deviation. Controls the smoothness of the filter.

Returns

series

Calculates Arnaud Legoux Moving Average.

\[\begin{split}norm &= \sum_{i=0}^{period- 1}e^{-\frac{(i - offset)^2}{\sigma^2}} \\ alma &= \frac{1}{norm}\sum_{i=0}^{period- 1}input_i e^{-\frac{(i - offset)^2}{\sigma^2}}\end{split}\]