|
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... | |
| CompositeIndicator (string name, PyObject left, PyObject right, PyObject handler) | |
| Initializes a new instance of CompositeIndicator using two indicators and a custom function. More... | |
| CompositeIndicator (PyObject left, PyObject right, PyObject handler) | |
| Initializes a new instance of CompositeIndicator using two indicators and a custom function. 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 32 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 85 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 102 of file CompositeIndicator.cs.
| QuantConnect.Indicators.CompositeIndicator.CompositeIndicator | ( | string | name, |
| PyObject | left, | ||
| PyObject | right, | ||
| PyObject | handler | ||
| ) |
Initializes a new instance of CompositeIndicator using two indicators and a custom function.
| name | The name of the composite indicator. |
| left | The first indicator in the composition. |
| right | The second indicator in the composition. |
| handler | A Python function that processes the indicator values. |
| ArgumentException | Thrown if the provided left or right indicator is not a valid QuantConnect Indicator object. |
Definition at line 117 of file CompositeIndicator.cs.
| QuantConnect.Indicators.CompositeIndicator.CompositeIndicator | ( | PyObject | left, |
| PyObject | right, | ||
| PyObject | handler | ||
| ) |
Initializes a new instance of CompositeIndicator using two indicators and a custom function.
| left | The first indicator in the composition. |
| right | The second indicator in the composition. |
| handler | A Python function that processes the indicator values. |
Definition at line 134 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 70 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 144 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 157 of file CompositeIndicator.cs.
|
get |
Gets the 'left' indicator for the delegate
Definition at line 52 of file CompositeIndicator.cs.
|
get |
Gets the 'right' indicator for the delegate
Definition at line 57 of file CompositeIndicator.cs.
|
get |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 63 of file CompositeIndicator.cs.