Class HistoryMessageAdapter
- Namespace
- StockSharp.Algo.Testing
- Assembly
- StockSharp.Algo.dll
The adapter, receiving messages form the storage IStorageRegistry.
public class HistoryMessageAdapter : MessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged- Inheritance
- 
      
      
      
      
      
      HistoryMessageAdapter
- Implements
- Inherited Members
- Extension Methods
Constructors
HistoryMessageAdapter(IdGenerator, ISecurityProvider)
Initializes a new instance of the HistoryMessageAdapter.
public HistoryMessageAdapter(IdGenerator transactionIdGenerator, ISecurityProvider securityProvider)Parameters
- transactionIdGeneratorIdGenerator
- Transaction id generator. 
- securityProviderISecurityProvider
- The provider of information about instruments. 
Properties
AdapterCache
public MarketDataStorageCache AdapterCache { get; set; }Property Value
CheckTradableDates
Check loading dates are they tradable.
public bool CheckTradableDates { get; set; }Property Value
CurrentTime
Current time, which will be passed to the Time.
public override DateTimeOffset CurrentTime { get; }Property Value
Drive
The storage which is used by default. By default, DefaultDrive is used.
public IMarketDataDrive Drive { get; set; }Property Value
IsFullCandlesOnly
Translates CandleMessage as only fully filled.
public override bool IsFullCandlesOnly { get; }Property Value
LoadedMessageCount
The number of loaded events.
public int LoadedMessageCount { get; }Property Value
MarketTimeChangedInterval
The interval of message TimeMessage generation. By default, it is equal to 1 sec.
public TimeSpan MarketTimeChangedInterval { get; set; }Property Value
OrderLogMarketDepthBuilders
Order book builders.
public IDictionary<SecurityId, IOrderLogMarketDepthBuilder> OrderLogMarketDepthBuilders { get; }Property Value
PostTradeMarketTimeChangedCount
The number of the event CurrentTimeChanged calls after end of trading. By default it is equal to 2.
public int PostTradeMarketTimeChangedCount { get; set; }Property Value
Remarks
It is required for activation of post-trade rules (rules, basing on events, occurring after end of trading).
SecurityProvider
The provider of information about instruments.
public ISecurityProvider SecurityProvider { get; }Property Value
StartDate
Date in history for starting the paper trading.
public DateTimeOffset StartDate { get; set; }Property Value
StopDate
Date in history to stop the paper trading (date is included).
public DateTimeOffset StopDate { get; set; }Property Value
StorageCache
public MarketDataStorageCache StorageCache { get; set; }Property Value
StorageFormat
The format of market data. Binary is used by default.
public StorageFormats StorageFormat { get; set; }Property Value
StorageRegistry
Market data storage.
public IStorageRegistry StorageRegistry { get; set; }Property Value
UseOutChannel
Use channels for in and out messages.
public override bool UseOutChannel { get; }Property Value
Methods
CreateOrderLogMarketDepthBuilder(SecurityId)
Create market depth builder.
public override IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)Parameters
- securityIdSecurityId
- Security ID. 
Returns
- IOrderLogMarketDepthBuilder
- Order log to market depth builder. 
DisposeManaged()
Release resources.
protected override void DisposeManaged()GetSupportedMarketDataTypes(SecurityId, DateTimeOffset?, DateTimeOffset?)
Get supported by adapter message types.
public override IEnumerable<DataType> GetSupportedMarketDataTypes(SecurityId securityId, DateTimeOffset? from, DateTimeOffset? to)Parameters
- securityIdSecurityId
- fromDateTimeOffset?
- Start date for request. If null, then all available messages will be returned. 
- toDateTimeOffset?
- End date for request. If null, then all available messages will be returned. 
Returns
- IEnumerable<DataType>
- Supported by adapter market data types. 
IsAllDownloadingSupported(DataType)
Is for the specified dataType all securities downloading enabled.
public override bool IsAllDownloadingSupported(DataType dataType)Parameters
- dataTypeDataType
- Data type info. 
Returns
- bool
- Check result. 
IsSupportCandlesUpdates(MarketDataMessage)
Support candles subscription and live updates.
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)Parameters
- subscriptionMarketDataMessage
Returns
- bool
- Check result. 
OnSendInMessage(Message)
Send message.
protected override bool OnSendInMessage(Message message)Parameters
- messageMessage
- Message. 
Returns
SendOutMessage(Message)
Send outgoing message and raise NewOutMessage event.
protected override void SendOutMessage(Message message)Parameters
- messageMessage
- Message. 
ToString()
public override string ToString()