FastForwardEnumerator
QuantConnect.Lean.Engine.DataFeeds.Enumerators.FastForwardEnumerator
FastForwardEnumerator(
enumerator: IEnumerator[BaseData],
time_provider: ITimeProvider,
time_zone: Any,
maximum_data_age: timedelta,
)
Bases: Object, IEnumerator[BaseData]
Provides the ability to fast forward an enumerator based on the age of the data
Initializes a new instance of the FastForwardEnumerator class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enumerator
|
IEnumerator[BaseData]
|
The source enumerator |
required |
time_provider
|
ITimeProvider
|
A time provider used to determine age of data |
required |
time_zone
|
Any
|
The data's time zone |
required |
maximum_data_age
|
timedelta
|
The maximum age of data allowed |
required |
current
current: BaseData
Gets the element in the collection at the current position of the enumerator.
dispose
dispose() -> None
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
move_next
move_next() -> bool
Advances the enumerator to the next element of the collection.
Returns:
| Type | Description |
|---|---|
bool
|
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |
reset
reset() -> None
Sets the enumerator to its initial position, which is before the first element in the collection.