HistoryMarketDataManager

StockSharp.Algo.Testing

History market data manager implementation.

Inherits: Disposable

Implements: IHistoryMarketDataManager, IDisposable

Constructors

HistoryMarketDataManager
public HistoryMarketDataManager(ITradingTimeLineGenerator timeLineGenerator)
historyMarketDataManager = HistoryMarketDataManager(timeLineGenerator)

Initializes a new instance of the HistoryMarketDataManager.

timeLineGenerator
Trading time line generator.

Properties

AdapterCache
public MarketDataStorageCache AdapterCache { get; set; }
value = historyMarketDataManager.AdapterCache
historyMarketDataManager.AdapterCache = value

MarketDataStorageCache.

CheckTradableDates
public bool CheckTradableDates { get; set; }
value = historyMarketDataManager.CheckTradableDates
historyMarketDataManager.CheckTradableDates = value

Check loading dates are they tradable.

CurrentTime
public DateTime CurrentTime { get; }
value = historyMarketDataManager.CurrentTime

Current time.

Drive
public IMarketDataDrive Drive { get; set; }
value = historyMarketDataManager.Drive
historyMarketDataManager.Drive = value

The storage which is used by default.

IsStarted
public bool IsStarted { get; private set; }
value = historyMarketDataManager.IsStarted
historyMarketDataManager.IsStarted = value

Is started.

LoadedMessageCount
public int LoadedMessageCount { get; private set; }
value = historyMarketDataManager.LoadedMessageCount
historyMarketDataManager.LoadedMessageCount = value

The number of loaded events.

MarketTimeChangedInterval
public TimeSpan MarketTimeChangedInterval { get; set; }
value = historyMarketDataManager.MarketTimeChangedInterval
historyMarketDataManager.MarketTimeChangedInterval = value

The interval of message TimeMessage generation.

PostTradeMarketTimeChangedCount
public int PostTradeMarketTimeChangedCount { get; set; }
value = historyMarketDataManager.PostTradeMarketTimeChangedCount
historyMarketDataManager.PostTradeMarketTimeChangedCount = value

The number of the event calls after end of trading.

StartDate
public DateTime StartDate { get; set; }
value = historyMarketDataManager.StartDate
historyMarketDataManager.StartDate = value

Date in history for starting.

StopDate
public DateTime StopDate { get; set; }
value = historyMarketDataManager.StopDate
historyMarketDataManager.StopDate = value

Date in history to stop (date is included).

StorageCache
public MarketDataStorageCache StorageCache { get; set; }
value = historyMarketDataManager.StorageCache
historyMarketDataManager.StorageCache = value

Cache.

StorageFormat
public StorageFormats StorageFormat { get; set; }
value = historyMarketDataManager.StorageFormat
historyMarketDataManager.StorageFormat = value

The format of market data.

StorageRegistry
public IStorageRegistry StorageRegistry { get; set; }
value = historyMarketDataManager.StorageRegistry
historyMarketDataManager.StorageRegistry = value

Market data storage.

Methods

DisposeManaged
protected override void DisposeManaged()
historyMarketDataManager.DisposeManaged()

Release resources.

DriveGenerators
private IEnumerable<Message> DriveGenerators(Message trigger, DateTime time)
result = historyMarketDataManager.DriveGenerators(trigger, time)

Drives the registered generators with the replay clock and same-security data, returning any generated messages (interleaved by the caller at the same server time). A time signal advances time-based generation for every generator; the triggering message feeds the generators of its own security, and each generated message is chained into the other same-security generators, so a generated tick drives that security's order-book generator. Generators ignore their own output type, so the chain terminates.

trigger
The replayed message that advanced the clock.
time
The current replay server time.

Returns: The generated messages, if any.

GetSupportedDataTypesAsync
public IAsyncEnumerable<DataType> GetSupportedDataTypesAsync(SecurityId securityId)
result = historyMarketDataManager.GetSupportedDataTypesAsync(securityId)

Get supported data types for security.

securityId
Security ID.

Returns: Supported data types.

HasGenerator
public bool HasGenerator(SecurityId securityId, DataType dataType)
result = historyMarketDataManager.HasGenerator(securityId, dataType)

Check if generator exists.

securityId
Security ID.
dataType
Data type.

Returns: if generator exists.

RegisterGenerator
public void RegisterGenerator(SecurityId securityId, DataType dataType, MarketDataGenerator generator, long transactionId)
historyMarketDataManager.RegisterGenerator(securityId, dataType, generator, transactionId)

Register generator.

securityId
Security ID.
dataType
Data type.
generator
Generator.
transactionId
Transaction ID.
Reset
public void Reset()
historyMarketDataManager.Reset()

Reset state.

StartAsync
public IAsyncEnumerable<Message> StartAsync(IEnumerable<BoardMessage> boards)
result = historyMarketDataManager.StartAsync(boards)

Start market data generation.

boards
Exchange boards.

Returns: Async enumerable of messages.

Stop
public void Stop()
historyMarketDataManager.Stop()

Stop market data generation.

SubscribeAsync
public ValueTask<Exception> SubscribeAsync(MarketDataMessage message, CancellationToken cancellationToken)
result = historyMarketDataManager.SubscribeAsync(message, cancellationToken)

Subscribe to market data.

message
Subscription message.
cancellationToken
Cancellation token.

Returns: Error if subscription failed, null otherwise.

UnregisterGenerator
public bool UnregisterGenerator(long originalTransactionId)
result = historyMarketDataManager.UnregisterGenerator(originalTransactionId)

Unregister generator.

originalTransactionId
Original transaction id.

Returns: if generator was found and removed.

Unsubscribe
public void Unsubscribe(long originalTransactionId)
historyMarketDataManager.Unsubscribe(originalTransactionId)

Unsubscribe from market data.

originalTransactionId
Original subscription transaction id.