Lean
$LEAN_TAG$
|
Implementation of the ISynchronizer interface which provides the mechanism to stream live data to the algorithm More...
Public Member Functions | |
override void | Initialize (IAlgorithm algorithm, IDataFeedSubscriptionManager dataFeedSubscriptionManager) |
Initializes the instance of the Synchronizer class More... | |
override IEnumerable< TimeSlice > | StreamData (CancellationToken cancellationToken) |
Returns an enumerable which provides the data to stream to the algorithm More... | |
override void | Dispose () |
Free resources More... | |
Public Attributes | |
override ITimeProvider | TimeProvider => _timeProvider |
Continuous UTC time provider More... | |
Public Attributes inherited from QuantConnect.Lean.Engine.DataFeeds.Synchronizer | |
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... | |
Static Public Attributes | |
static readonly int | BatchingDelay = Config.GetInt("consumer-batching-timeout-ms") |
Consumer batching timeout in ms More... | |
Protected Member Functions | |
override ITimeProvider | GetTimeProvider () |
Gets the ITimeProvider to use. By default this will load the RealTimeProvider for live mode, else SubscriptionFrontierTimeProvider More... | |
override void | PostInitialize () |
Performs additional initialization steps after algorithm initialization More... | |
virtual int | GetPulseDueTime (DateTime now) |
Will return the amount of milliseconds that are missing for the next time pulse More... | |
virtual void | OnSubscriptionNewDataAvailable (object sender, EventArgs args) |
Trigger new data event More... | |
Additional Inherited Members | |
Properties inherited from QuantConnect.Lean.Engine.DataFeeds.Synchronizer | |
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... | |
Implementation of the ISynchronizer interface which provides the mechanism to stream live data to the algorithm
Definition at line 31 of file LiveSynchronizer.cs.
|
virtual |
Initializes the instance of the Synchronizer class
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Synchronizer.
Definition at line 51 of file LiveSynchronizer.cs.
|
virtual |
Returns an enumerable which provides the data to stream to the algorithm
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Synchronizer.
Definition at line 84 of file LiveSynchronizer.cs.
|
virtual |
Free resources
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Synchronizer.
Definition at line 185 of file LiveSynchronizer.cs.
|
protectedvirtual |
Gets the ITimeProvider to use. By default this will load the RealTimeProvider for live mode, else SubscriptionFrontierTimeProvider
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Synchronizer.
Definition at line 197 of file LiveSynchronizer.cs.
|
protectedvirtual |
Performs additional initialization steps after algorithm initialization
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Synchronizer.
Definition at line 205 of file LiveSynchronizer.cs.
|
protectedvirtual |
Will return the amount of milliseconds that are missing for the next time pulse
Definition at line 214 of file LiveSynchronizer.cs.
|
protectedvirtual |
Trigger new data event
sender | Sender of the event |
args | Event information |
Definition at line 225 of file LiveSynchronizer.cs.
|
static |
Consumer batching timeout in ms
Definition at line 36 of file LiveSynchronizer.cs.
override ITimeProvider QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.TimeProvider => _timeProvider |
Continuous UTC time provider
Definition at line 46 of file LiveSynchronizer.cs.