Skip to content

ScheduledEnumerator

QuantConnect.Lean.Engine.DataFeeds.Enumerators.ScheduledEnumerator

ScheduledEnumerator(
    underlying_enumerator: IEnumerator[BaseData],
    scheduled_times: List[datetime],
    frontier_time_provider: ITimeProvider,
    schedule_time_zone: Any,
    start_time: Union[datetime, date],
)

Bases: Object, IEnumerator[BaseData]

This enumerator will filter out data of the underlying enumerator based on a provided schedule. Will respect the schedule above the data, meaning will let older data through if the underlying provides none for the schedule date

Creates a new instance

Parameters:

Name Type Description Default
underlying_enumerator IEnumerator[BaseData]

The underlying enumerator to filter

required
scheduled_times List[datetime]

The scheduled times to emit new data points

required
frontier_time_provider ITimeProvider
required
schedule_time_zone Any
required
start_time Union[datetime, date]

the underlying request start time

required

current

current: BaseData

The current data point

dispose

dispose() -> None

Disposes of the underlying enumerator

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

Resets the underlying enumerator