Calculates a Finite Impulse Response Filter.
A double array where the first term is the FIR of the asset on the most recent period considered, the second term is the FIR on the period before that and so on.
This is a type of smoothing filter that assigns different weights to historical prices.
The FIR indicator is evaluated by the following formula:
FIR = ( (historicalValues[i] * weights[0]) + historicalValues[i-1] * weights[1] +...) / (Sum of weights)
where:
historicalValues[i] is the most recent historical price, historicalValues[i-1]
is the price in the previous period and so on...
weights[0] is the weight associated with the most recent period, weights[1] is
the weight associated with the previous periods assets price and so on...
Sum of Weights = weights[0] + weights[1] +...| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if the length of the array parameter historicalValues is less than the length of weights array or if any elements of this array is strictly negative. |
Filters Class | WebCab.COM.Finance.Trading.Indicators Namespace