sma

sma(series, period)
Parameters
  • source (series) – Input series

  • period (numeric) – MA period

Returns

series

Returns the simple moving average of source for the period bars. If there are less than period values in the series - the result is nan.

\[\mathrm{sma} = \frac{\sum_{i=0}^{period - 1}\mathrm{series}_i}{period}\]