.netCHARTING v10.5 Documentation


dotnetCHARTING Namespace > FinancialEngine Class > FiniteImpulseResponse Method : FiniteImpulseResponse(SeriesCollection,ElementValue,Double[]) Method
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.
Specifies the particular element value (for example High, Low, Close or Open of the financial time series) which will be considered within this indicator evaluation. In particular, if you wish to use the element value high then you should pass the parameter High. In a similarly fashion if you wish to use the low, close or open, then you should pass the parameter Low, Close, Open, respectively.
A double array which represent the different weights associated with the given prices.
FiniteImpulseResponse(SeriesCollection,ElementValue,Double[]) Method
Calculates a Finite Impulse Response Filter.
Syntax
'Declaration
 
Public Overloads Shared Function FiniteImpulseResponse( _
   ByVal sc As SeriesCollection, _
   ByVal elementValue As ElementValue, _
   ByVal weights() As Double _
) As SeriesCollection
'Usage
 
Dim sc As SeriesCollection
Dim elementValue As ElementValue
Dim weights() As Double
Dim value As SeriesCollection
 
value = FinancialEngine.FiniteImpulseResponse(sc, elementValue, weights)
public static SeriesCollection FiniteImpulseResponse( 
   SeriesCollection sc,
   ElementValue elementValue,
   double[] weights
)

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.
elementValue
Specifies the particular element value (for example High, Low, Close or Open of the financial time series) which will be considered within this indicator evaluation. In particular, if you wish to use the element value high then you should pass the parameter High. In a similarly fashion if you wish to use the low, close or open, then you should pass the parameter Low, Close, Open, respectively.
weights
A double array which represent the different weights associated with the given prices.
Exceptions
ExceptionDescription
Thrown if the length of the given series, s, is less than the length of weights double array or if any elements of the s is strictly negative.
Remarks
This is a type of smoothing filter that assigns different weights to prices from the past.

Evaluation

The FIR indicator is evaluated by the following formula:
FIR = ((historicalValues[i]*weights[0]) + historicalValues[i-1]*wights[1] + ...)/(Sum of weights)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also