SMMA

Calculates the Smoothed Moving Average indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
applyToSeries<Number>--
periodNumber14-

Returns: Series<Number>

SMMA is a built-in function - you can use it directly. Below is an example implementation:

1 function SMMA(applyTo, period = 14):
2 series SMMA:
3 once: SMA(applyTo, period)
4 then: (SMMA[1] * (period - 1) + applyTo) / period