Class HistoryMessageAdapter
- Namespace
- StockSharp.Algo.Testing
- Assembly
- StockSharp.Algo.dll
The adapter, receiving messages form the storage IStorageRegistry.
public class HistoryMessageAdapter : MessageAdapter, IMessageAdapter, IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, ICloneable<IMessageAdapter>, ICloneable, 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
transactionIdGeneratorIdGeneratorTransaction id generator.
securityProviderISecurityProviderThe 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 out messages.
public override bool UseOutChannel { get; }
Property Value
Methods
CreateOrderLogMarketDepthBuilder(SecurityId)
Create market depth builder.
public override IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)
Parameters
securityIdSecurityIdSecurity ID.
Returns
- IOrderLogMarketDepthBuilder
Order log to market depth builder.
DisposeManaged()
Release resources.
protected override void DisposeManaged()
GetSupportedMarketDataTypes(SecurityId, DateTimeOffset?, DateTimeOffset?)
public override IEnumerable<DataType> GetSupportedMarketDataTypes(SecurityId securityId, DateTimeOffset? from, DateTimeOffset? to)
Parameters
securityIdSecurityIdfromDateTimeOffset?toDateTimeOffset?
Returns
IsAllDownloadingSupported(DataType)
Is for the specified dataType all securities downloading enabled.
public override bool IsAllDownloadingSupported(DataType dataType)
Parameters
dataTypeDataTypeData 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)
protected override bool OnSendInMessage(Message message)
Parameters
messageMessage
Returns
SendOutMessage(Message)
protected override void SendOutMessage(Message message)
Parameters
messageMessage
ToString()
public override string ToString()