WAverage (Function)
The WAverage is a weighted moving average of the Price over the Length specified. It is calculated by giving the more current data a heavier weight and the oldest data less weight.
Syntax
WAverage(Price, Length)
Returns (Double)
A numeric value containing the weighted moving average 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
Just as the Average function needs a Price and Length to calculate, the WAverage function also needs the Price and Length inputs. The Price is the unit you want to average, and the Length is the number of units you are averaging. The WAverage is used in the same way as the average function and can give stronger and earlier indications to trend direction as it follows the most recent data closer.
Example
Plot1(WAverage(Close,20));
See Also
Average, TriAverage, and XAverage