Skip to content

SynchronizingSliceEnumerator

QuantConnect.Lean.Engine.DataFeeds.Enumerators.SynchronizingSliceEnumerator

SynchronizingSliceEnumerator(
    *enumerators: Union[
        IEnumerator[Slice], Iterable[IEnumerator[Slice]]
    ]
)
SynchronizingSliceEnumerator(
    enumerators: List[IEnumerator],
)

Bases: SynchronizingEnumerator[Slice]

Represents an enumerator capable of synchronizing other slice enumerators in time. This assumes that all enumerators have data time stamped in the same time zone

Initializes a new instance of the SynchronizingSliceEnumerator class

Parameters:

Name Type Description Default
enumerators Union[IEnumerator[Slice], Iterable[IEnumerator[Slice]]]

The enumerators to be synchronized. NOTE: Assumes the same time zone for all data

()

current

current: QuantConnect_Lean_Engine_DataFeeds_Enumerators_SynchronizingEnumerator_T

Gets the element in the collection at the current position of the enumerator.

get_instance_time

get_instance_time(instance: Slice) -> datetime

Gets the Timestamp for the data

This codeEntityType is protected.

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.