TMA

Calculates the Triangular Moving Average indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
applyToSeries<Number>
close
-
periodNumber14-

Returns: Series<Number>

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

12
function TMA(applyTo = close, period = 14):
Sum(SMA(applyTo, period), period) / period