SmoothedAverage (Function)

image\trumpet2.gif Disclaimer

The SmoothedAverage series function further smoothes an average of the last x bars. It does this by using the previous value of itself. This function is used in the same way as the Average function.

Syntax

SmoothedAverage(Price, Length)

Returns (Double)

A numeric value containing the Smoothed Average of values over a specified number of bars.

Parameters

Name

Type

Description

Price

Numeric

Specifies which bar value (price, function, or formula) to use.

Length

Numeric

Sets the number of bars to consider.

Remarks

On the first bar, this function adds together all the values returned by the input Price for the specified Length, divides the sum by the Length, then stores the value in a variable called SUM. Only on the first bar is the SmoothedAverage function equal to the value stored in SUM.

SUM = Summation(Price, Length)

On each bar there after, the function uses a different equation.

SmoothedAverage = (Sum[1] - SmoothedAverage[1] + Price)/Length

Example

Plot1(SmoothedAverage(C,20);