Links

TMA - Triangular Moving Average

Description

This specifically weighted average has an extra smoothing component. The weightings are not linear, but instead take on a triangular pattern. To demonstrate, the weighting for a 7-period average would be 1,2,3,4,3,2,1. More weight is given to the median value of the time series, and the newest and oldest data is given less weight.

Usage

TMA(int period)
TMA(IDataSeries inSeries, int period)
TMA(int period)[int barsAgo]
TMA(IDataSeries inSeries, int period)[int barsAgo]

Return value

double
When using this method with an index (e.g. TMA(14)[int barsAgo] ), the value of the indicator will be issued for the referenced bar.

Parameters

inSeries Input data series for the indicator
period Number of bars included in the calculations

Visualization

TMA - Triangular Moving Average

Example

//Output for the value of the TMA
Print("The current value for the TMA is " + TMA(14)[0]);
Last modified 1yr ago