Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.Synchronizer Class Reference

Implementation of the ISynchronizer interface which provides the mechanism to stream data to the algorithm More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.Synchronizer:
[legend]

Public Member Functions

virtual void Initialize (IAlgorithm algorithm, IDataFeedSubscriptionManager dataFeedSubscriptionManager)
 Initializes the instance of the Synchronizer class More...
 
virtual IEnumerable< TimeSliceStreamData (CancellationToken cancellationToken)
 Returns an enumerable which provides the data to stream to the algorithm More...
 
virtual void Dispose ()
 Free resources More...
 

Public Attributes

virtual ITimeProvider TimeProvider => null
 Continuous UTC time provider, only valid for live trading see LiveSynchronizer More...
 
ITimeProvider FrontierTimeProvider => SubscriptionSynchronizer
 Time provider which returns current UTC frontier time More...
 

Protected Member Functions

virtual void PostInitialize ()
 Performs additional initialization steps after algorithm initialization More...
 
virtual ITimeProvider GetTimeProvider ()
 Gets the ITimeProvider to use. By default this will load the RealTimeProvider for live mode, else SubscriptionFrontierTimeProvider More...
 

Properties

IAlgorithm Algorithm [get, set]
 The algorithm instance More...
 
IDataFeedSubscriptionManager SubscriptionManager [get, set]
 The subscription manager More...
 
SubscriptionSynchronizer SubscriptionSynchronizer [get, set]
 The subscription synchronizer More...
 
TimeSliceFactory TimeSliceFactory [get, set]
 The time slice factory More...
 
- Properties inherited from QuantConnect.Lean.Engine.DataFeeds.IDataFeedTimeProvider
ITimeProvider TimeProvider [get]
 Continuous UTC time provider More...
 
ITimeProvider FrontierTimeProvider [get]
 Time provider which returns current UTC frontier time More...
 

Detailed Description

Implementation of the ISynchronizer interface which provides the mechanism to stream data to the algorithm

Definition at line 30 of file Synchronizer.cs.

Member Function Documentation

◆ Initialize()

virtual void QuantConnect.Lean.Engine.DataFeeds.Synchronizer.Initialize ( IAlgorithm  algorithm,
IDataFeedSubscriptionManager  dataFeedSubscriptionManager 
)
virtual

Initializes the instance of the Synchronizer class

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.

Definition at line 67 of file Synchronizer.cs.

◆ StreamData()

virtual IEnumerable<TimeSlice> QuantConnect.Lean.Engine.DataFeeds.Synchronizer.StreamData ( CancellationToken  cancellationToken)
virtual

Returns an enumerable which provides the data to stream to the algorithm

Implements QuantConnect.Lean.Engine.DataFeeds.ISynchronizer.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.

Definition at line 80 of file Synchronizer.cs.

Here is the call graph for this function:

◆ PostInitialize()

virtual void QuantConnect.Lean.Engine.DataFeeds.Synchronizer.PostInitialize ( )
protectedvirtual

Performs additional initialization steps after algorithm initialization

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.

Definition at line 155 of file Synchronizer.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTimeProvider()

virtual ITimeProvider QuantConnect.Lean.Engine.DataFeeds.Synchronizer.GetTimeProvider ( )
protectedvirtual

Gets the ITimeProvider to use. By default this will load the RealTimeProvider for live mode, else SubscriptionFrontierTimeProvider

Returns
The ITimeProvider to use

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.

Definition at line 178 of file Synchronizer.cs.

Here is the caller graph for this function:

◆ Dispose()

virtual void QuantConnect.Lean.Engine.DataFeeds.Synchronizer.Dispose ( )
virtual

Free resources

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.

Definition at line 218 of file Synchronizer.cs.

Member Data Documentation

◆ TimeProvider

virtual ITimeProvider QuantConnect.Lean.Engine.DataFeeds.Synchronizer.TimeProvider => null

Continuous UTC time provider, only valid for live trading see LiveSynchronizer

Definition at line 57 of file Synchronizer.cs.

◆ FrontierTimeProvider

ITimeProvider QuantConnect.Lean.Engine.DataFeeds.Synchronizer.FrontierTimeProvider => SubscriptionSynchronizer

Time provider which returns current UTC frontier time

Definition at line 62 of file Synchronizer.cs.

Property Documentation

◆ Algorithm

IAlgorithm QuantConnect.Lean.Engine.DataFeeds.Synchronizer.Algorithm
getsetprotected

The algorithm instance

Definition at line 37 of file Synchronizer.cs.

◆ SubscriptionManager

IDataFeedSubscriptionManager QuantConnect.Lean.Engine.DataFeeds.Synchronizer.SubscriptionManager
getsetprotected

The subscription manager

Definition at line 42 of file Synchronizer.cs.

◆ SubscriptionSynchronizer

SubscriptionSynchronizer QuantConnect.Lean.Engine.DataFeeds.Synchronizer.SubscriptionSynchronizer
getsetprotected

The subscription synchronizer

Definition at line 47 of file Synchronizer.cs.

◆ TimeSliceFactory

TimeSliceFactory QuantConnect.Lean.Engine.DataFeeds.Synchronizer.TimeSliceFactory
getsetprotected

The time slice factory

Definition at line 52 of file Synchronizer.cs.


The documentation for this class was generated from the following file: