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.
Syntax
Parameters
- sc
- A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
- weightSeries
- A series of doubles which assigns weights to the k-th previous historical values for the given period on which the moving average is being evaluated. Here k is just the length of the weights array given.
- lengthOfMA
- The number of periods over which the weighted moving average is evaluated.
Return Value
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.
Exceptions
Exception |
Description |
ArgumentException |
Thrown if the length of the weightsSeries and s differ or if either series is empty. |
Remarks
See Also