Lean
$LEAN_TAG$
|
This indicator is capable of wiring up two separate indicators into a single indicator such that the output of each will be sent to a user specified function. More...
Public Member Functions | |
delegate IndicatorResult | IndicatorComposer (IndicatorBase left, IndicatorBase right) |
Delegate type used to compose the output of two indicators into a new value. More... | |
override void | Reset () |
Resets this indicator to its initial state More... | |
CompositeIndicator (string name, IndicatorBase left, IndicatorBase right, IndicatorComposer composer) | |
Creates a new CompositeIndicator capable of taking the output from the left and right indicators and producing a new value via the composer delegate specified More... | |
CompositeIndicator (IndicatorBase left, IndicatorBase right, IndicatorComposer composer) | |
Creates a new CompositeIndicator capable of taking the output from the left and right indicators and producing a new value via the composer delegate specified More... | |
Protected Member Functions | |
override IndicatorResult | ValidateAndComputeNextValue (IndicatorDataPoint input) |
Computes the next value of this indicator from the given state and returns an instance of the IndicatorResult class More... | |
override decimal | ComputeNextValue (IndicatorDataPoint _) |
Computes the next value of this indicator from the given state More... | |
Properties | |
IndicatorBase | Left [get] |
Gets the 'left' indicator for the delegate More... | |
IndicatorBase | Right [get] |
Gets the 'right' indicator for the delegate More... | |
override bool | IsReady [get] |
Gets a flag indicating when this indicator is ready and fully initialized More... | |
This indicator is capable of wiring up two separate indicators into a single indicator such that the output of each will be sent to a user specified function.
This type is initialized such that there is no need to call the Update function. This indicator will have its values automatically updated each time a new piece of data is received from both the left and right indicators.
Definition at line 29 of file CompositeIndicator.cs.
QuantConnect.Indicators.CompositeIndicator.CompositeIndicator | ( | string | name, |
IndicatorBase | left, | ||
IndicatorBase | right, | ||
IndicatorComposer | composer | ||
) |
Creates a new CompositeIndicator capable of taking the output from the left and right indicators and producing a new value via the composer delegate specified
name | The name of this indicator |
left | The left indicator for the 'composer' |
right | The right indicator for the 'composer' |
composer | Function used to compose the left and right indicators |
Definition at line 81 of file CompositeIndicator.cs.
QuantConnect.Indicators.CompositeIndicator.CompositeIndicator | ( | IndicatorBase | left, |
IndicatorBase | right, | ||
IndicatorComposer | composer | ||
) |
Creates a new CompositeIndicator capable of taking the output from the left and right indicators and producing a new value via the composer delegate specified
left | The left indicator for the 'composer' |
right | The right indicator for the 'composer' |
composer | Function used to compose the left and right indicators |
Definition at line 97 of file CompositeIndicator.cs.
delegate IndicatorResult QuantConnect.Indicators.CompositeIndicator.IndicatorComposer | ( | IndicatorBase | left, |
IndicatorBase | right | ||
) |
Delegate type used to compose the output of two indicators into a new value.
A simple example would be to compute the difference between the two indicators (such as with MACD) (left, right) => left - right
left | The left indicator |
right | The right indicator |
override void QuantConnect.Indicators.CompositeIndicator.Reset | ( | ) |
Resets this indicator to its initial state
Definition at line 67 of file CompositeIndicator.cs.
|
protected |
Computes the next value of this indicator from the given state and returns an instance of the IndicatorResult class
input | The input given to the indicator |
Definition at line 107 of file CompositeIndicator.cs.
|
protected |
Computes the next value of this indicator from the given state
Since this class overrides ValidateAndComputeNextValue, this method is a no-op
_ | The input given to the indicator |
Definition at line 120 of file CompositeIndicator.cs.
|
get |
Gets the 'left' indicator for the delegate
Definition at line 49 of file CompositeIndicator.cs.
|
get |
Gets the 'right' indicator for the delegate
Definition at line 54 of file CompositeIndicator.cs.
|
get |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 60 of file CompositeIndicator.cs.