Evaluate the Weighted Moving Average(WMA) where the weights associated to all the elements of the historical values are given and the WMA is evaluated for all periods for which there is sufficient historical data.
[Visual Basic]
Overloads Public Shared Function WeightedMovingAverage( _
ByVal sc As SeriesCollection, _
ByVal elementValue As ElementValue, _
ByVal weightSeries As Series, _
ByVal lengthOfMA As Integer _
) As SeriesCollection
[C#]
public static SeriesCollection WeightedMovingAverage(
SeriesCollection sc,
ElementValue elementValue,
Series weightSeries,
int lengthOfMA
);
A series where the first term is the value of the moving average corresponding of the latest period, the second term is the value for the previous period and so on.
Exception | Description |
---|---|
ArgumentException | Thrown if the length of the weights and series differ or if either series is empty. |
That is, the weights are fixed for all given historical values and the window of length
lengthOfMA
over which the GMA is evaluated is shifted along the series.
Generally speaking the WMA where the weights are all set and the window over which GMA is evaluated is shifted is used when you wish to give emphasis to particular dates.
Note: The length of the weights
array must equal or be greater
than the length of the historicalPrices
series. If it's greater than we
ignore the supplementary values.
FinancialEngine Class | FinancialEngine Members | Overload List
2002 - 2005 Webavail Productions Inc. & Corporate Web Solutions Ltd.. All Rights Reserved.