|
Lean
$LEAN_TAG$
|
Base class for indicators that work with multiple different symbols. More...
Classes | |
| class | SymbolData |
| Contains the data points, the current input and other relevant indicator data for a symbol. More... | |
Public Member Functions | |
| override void | Reset () |
| Resets this indicator to its initial state More... | |
Public Attributes | |
| override bool | IsReady => DataBySymbol.Values.All(data => data.DataPoints.IsReady) |
| Gets a flag indicating when this indicator is ready and fully initialized More... | |
Protected Member Functions | |
| MultiSymbolIndicator (string name, IEnumerable< Symbol > symbols, int period) | |
| Initializes the dual symbol indicator. More... | |
| override decimal | ComputeNextValue (TInput input) |
| Checks and computes the indicator if the input data matches. This method ensures the input data points are from matching time periods and different symbols. More... | |
| abstract decimal | ComputeIndicator () |
| Computes the next value of this indicator from the given state. This will be called only when the indicator is ready, that is, when data for all symbols at a given time is available. More... | |
Properties | |
| Dictionary< Symbol, SymbolData > | DataBySymbol [get] |
| Relevant data for each symbol the indicator works on, including all inputs and actual data points used for calculation. More... | |
| decimal | IndicatorValue [get, set] |
| The most recently computed value of the indicator. More... | |
| int | WarmUpPeriod [get, set] |
| Required period, in data points, for the indicator to be ready and fully initialized. More... | |
Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider | |
| int | WarmUpPeriod [get] |
| Required period, in data points, for the indicator to be ready and fully initialized. More... | |
Base class for indicators that work with multiple different symbols.
| TInput | Indicator input data type |
| TInput | : | IBaseData |
Definition at line 29 of file MultiSymbolIndicator.cs.
|
protected |
Initializes the dual symbol indicator.
The constructor accepts a target symbol and a reference symbol. It also initializes the time zones for both symbols and checks if they are different.
| name | The name of the indicator. |
| symbols | The symbols the indicator works on . |
| period | The period (number of data points) over which to calculate the indicator. |
Definition at line 63 of file MultiSymbolIndicator.cs.
|
protected |
Checks and computes the indicator if the input data matches. This method ensures the input data points are from matching time periods and different symbols.
| input | The input data point (e.g., TradeBar for a symbol). |
Definition at line 77 of file MultiSymbolIndicator.cs.
|
protectedpure virtual |
Computes the next value of this indicator from the given state. This will be called only when the indicator is ready, that is, when data for all symbols at a given time is available.
Implemented in QuantConnect.Indicators.ImpliedVolatility, and QuantConnect.Indicators.OptionGreeksIndicatorBase.
| override void QuantConnect.Indicators.MultiSymbolIndicator< TInput >.Reset | ( | ) |
Resets this indicator to its initial state
Definition at line 117 of file MultiSymbolIndicator.cs.
| override bool QuantConnect.Indicators.MultiSymbolIndicator< TInput >.IsReady => DataBySymbol.Values.All(data => data.DataPoints.IsReady) |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 51 of file MultiSymbolIndicator.cs.
|
getprotected |
Relevant data for each symbol the indicator works on, including all inputs and actual data points used for calculation.
Definition at line 36 of file MultiSymbolIndicator.cs.
|
getsetprotected |
The most recently computed value of the indicator.
Definition at line 41 of file MultiSymbolIndicator.cs.
|
getset |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 46 of file MultiSymbolIndicator.cs.