ssma

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

  • period (numeric) – MA period

Returns

series

Returns the smoothed simple moving average of source for the period bars. If there are less than period values in the series - the result is nan. The first value of ssma is calculated as sma(series, period). Subsequent values are calculated according to the formula:

\[\mathrm{ssma} = \frac{\mathrm{(\mathrm{period} - 1)\mathrm{ssma}_1 + \mathrm{series}_0}}{\mathrm{period}}\]