Lean
$LEAN_TAG$
|
The functional indicator is used to lift any function into an indicator. This can be very useful when trying to combine output of several indicators, or for expression a mathematical equation More...
Public Member Functions | |
FunctionalIndicator (string name, Func< T, decimal > computeNextValue, Func< IndicatorBase< T >, bool > isReady) | |
Creates a new FunctionalIndicator using the specified functions as its implementation. More... | |
FunctionalIndicator (string name, Func< T, decimal > computeNextValue, Func< IndicatorBase< T >, bool > isReady, Action reset) | |
Creates a new FunctionalIndicator using the specified functions as its implementation. More... | |
override void | Reset () |
Resets this indicator to its initial state, optionally using the reset action passed via the constructor More... | |
Protected Member Functions | |
override decimal | ComputeNextValue (T input) |
Computes the next value of this indicator from the given state More... | |
Properties | |
override bool | IsReady [get] |
Gets a flag indicating when this indicator is ready and fully initialized More... | |
The functional indicator is used to lift any function into an indicator. This can be very useful when trying to combine output of several indicators, or for expression a mathematical equation
T | The input type for this indicator |
T | : | IBaseData |
Definition at line 26 of file FunctionalIndicator.cs.
QuantConnect.Indicators.FunctionalIndicator< T >.FunctionalIndicator | ( | string | name, |
Func< T, decimal > | computeNextValue, | ||
Func< IndicatorBase< T >, bool > | isReady | ||
) |
Creates a new FunctionalIndicator using the specified functions as its implementation.
name | The name of this indicator |
computeNextValue | A function accepting the input value and returning this indicator's output value |
isReady | A function accepting this indicator and returning true if the indicator is ready, false otherwise |
Definition at line 42 of file FunctionalIndicator.cs.
QuantConnect.Indicators.FunctionalIndicator< T >.FunctionalIndicator | ( | string | name, |
Func< T, decimal > | computeNextValue, | ||
Func< IndicatorBase< T >, bool > | isReady, | ||
Action | reset | ||
) |
Creates a new FunctionalIndicator using the specified functions as its implementation.
name | The name of this indicator |
computeNextValue | A function accepting the input value and returning this indicator's output value |
isReady | A function accepting this indicator and returning true if the indicator is ready, false otherwise |
reset | Function called to reset this indicator and any indicators this is dependent on |
Definition at line 56 of file FunctionalIndicator.cs.
|
protected |
Computes the next value of this indicator from the given state
input | The input given to the indicator |
Definition at line 77 of file FunctionalIndicator.cs.
override void QuantConnect.Indicators.FunctionalIndicator< T >.Reset | ( | ) |
Resets this indicator to its initial state, optionally using the reset action passed via the constructor
Definition at line 85 of file FunctionalIndicator.cs.
|
get |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 68 of file FunctionalIndicator.cs.