IIndicator
QuantConnect.Indicators.IIndicator
Bases: Generic[QuantConnect_Indicators_IIndicator_T], IComparable[QuantConnect_Indicators_IIndicator], QuantConnect_Indicators_IIndicator
KEEPING THIS INTERFACE FOR BACKWARDS COMPATIBILITY. Represents an indicator that can receive data updates and emit events when the value of the indicator has changed.
updated
updated: _EventContainer[
Callable[[Object, IndicatorDataPoint], Any], Any
]
Event handler that fires after this indicator is updated
name
name: str
Gets a name for this indicator
is_ready
is_ready: bool
Gets a flag indicating when this indicator is ready and fully initialized
current
current: IndicatorDataPoint
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
samples
samples: int
Gets the number of samples processed by this indicator
max
max(
period: int, wait_for_first_to_ready: bool = True
) -> Maximum
Creates a new Maximum indicator with the specified period from the left indicator
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
The period of the Maximum indicator |
required |
wait_for_first_to_ready
|
bool
|
True to only send updates to the second if left.IsReady returns true, false to always send updates |
True
|
Returns:
| Type | Description |
|---|---|
Maximum
|
A reference to the Maximum indicator to allow for method chaining. |
reset
reset() -> None
Resets this indicator to its initial state
update
update(input: IBaseData) -> bool
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
IBaseData
|
The value to use to update this indicator |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if this indicator is ready, false otherwise. |