Lean
$LEAN_TAG$
|
This is an implementation of IDataQueueHandler used for testing. FakeHistoryProvider More...
Public Member Functions | |
FakeDataQueue () | |
Initializes a new instance of the FakeDataQueue class to randomly emit data for each symbol More... | |
FakeDataQueue (IDataAggregator dataAggregator, int dataPointsPerSecondPerSymbol=500000) | |
Initializes a new instance of the FakeDataQueue class to randomly emit data for each symbol More... | |
IEnumerator< BaseData > | Subscribe (SubscriptionDataConfig dataConfig, EventHandler newDataAvailableHandler) |
Subscribe to the specified configuration More... | |
void | SetJob (LiveNodePacket job) |
Sets the job we're subscribing for More... | |
void | Unsubscribe (SubscriptionDataConfig dataConfig) |
Removes the specified configuration More... | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
IEnumerable< Symbol > | LookupSymbols (Symbol symbol, bool includeExpired, string securityCurrency=null) |
Method returns a collection of Symbols that are available at the data source. More... | |
bool | CanPerformSelection () |
Returns whether selection can take place or not. More... | |
Public Attributes | |
bool | IsConnected => true |
Returns whether the data provider is connected More... | |
Properties | |
virtual ITimeProvider | TimeProvider = RealTimeProvider.Instance [get] |
Continuous UTC time provider More... | |
Properties inherited from QuantConnect.Interfaces.IDataQueueHandler | |
bool | IsConnected [get] |
Returns whether the data provider is connected More... | |
This is an implementation of IDataQueueHandler used for testing. FakeHistoryProvider
Definition at line 34 of file FakeDataQueue.cs.
QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.FakeDataQueue | ( | ) |
Initializes a new instance of the FakeDataQueue class to randomly emit data for each symbol
Definition at line 57 of file FakeDataQueue.cs.
QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.FakeDataQueue | ( | IDataAggregator | dataAggregator, |
int | dataPointsPerSecondPerSymbol = 500000 |
||
) |
Initializes a new instance of the FakeDataQueue class to randomly emit data for each symbol
Definition at line 66 of file FakeDataQueue.cs.
IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.Subscribe | ( | SubscriptionDataConfig | dataConfig, |
EventHandler | newDataAvailableHandler | ||
) |
Subscribe to the specified configuration
dataConfig | defines the parameters to subscribe to a data feed |
newDataAvailableHandler | handler to be fired on new data available |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 113 of file FakeDataQueue.cs.
void QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.SetJob | ( | LiveNodePacket | job | ) |
Sets the job we're subscribing for
job | Job we're subscribing for |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 125 of file FakeDataQueue.cs.
void QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.Unsubscribe | ( | SubscriptionDataConfig | dataConfig | ) |
Removes the specified configuration
dataConfig | Subscription config to be removed |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 133 of file FakeDataQueue.cs.
void QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Definition at line 148 of file FakeDataQueue.cs.
IEnumerable<Symbol> QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.LookupSymbols | ( | Symbol | symbol, |
bool | includeExpired, | ||
string | securityCurrency = null |
||
) |
Method returns a collection of Symbols that are available at the data source.
symbol | Symbol to lookup |
includeExpired | Include expired contracts |
securityCurrency | Expected security currency(if any) |
Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.
Definition at line 224 of file FakeDataQueue.cs.
bool QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.CanPerformSelection | ( | ) |
Returns whether selection can take place or not.
This is useful to avoid a selection taking place during invalid times, for example IB reset times or when not connected, because if allowed selection would fail since IB isn't running and would kill the algorithm
Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.
Definition at line 241 of file FakeDataQueue.cs.
bool QuantConnect.Lean.Engine.DataFeeds.Queues.FakeDataQueue.IsConnected => true |
Returns whether the data provider is connected
Definition at line 143 of file FakeDataQueue.cs.
|
getprotected |
Continuous UTC time provider
Definition at line 51 of file FakeDataQueue.cs.