Time series moving average
The time series moving average is calculated using linear regression techniques. Rather than plotting a straight linear regression line, a time series moving average plots the last point of the line. It does this using the specified number of periods for each day. The individual points are then connected together with a line to form a time series moving average.
This moving average is sometimes referred to as a “moving linear regression” study or a “regression oscillator.”
For information on calculating linear regression using the least squares method (the basis behind time series moving averages), refer to any basic statistics book.
Triangular moving average
A triangular moving average is similar to exponential and weighted moving averages except a different weighting scheme is used. Exponential and weighted moving averages assign the majority of the weight to the most recent data. Simple moving averages assign the weight equally across all the data. With a triangular moving average, the majority of the weight is assigned to the middle portion of the data.
A triangular moving average is simply a double-smoothed simple moving average.
The rule is to take the length divided by 2 as one average, and that number plus 1 as the second.