Class MarketEmulator
- Namespace
- StockSharp.Algo.Testing
- Assembly
- StockSharp.Algo.dll
Emulator.
public class MarketEmulator : BaseLogReceiver, IMarketEmulator, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
MarketEmulator
- Implements
-
ICloneable<IMessageChannel>IPersistable
- Inherited Members
- Extension Methods
Constructors
MarketEmulator(ISecurityProvider, IPortfolioProvider, IExchangeInfoProvider, IdGenerator)
Initializes a new instance of the MarketEmulator.
public MarketEmulator(ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IExchangeInfoProvider exchangeInfoProvider, IdGenerator transactionIdGenerator)
Parameters
securityProvider
ISecurityProviderThe provider of information about instruments.
portfolioProvider
IPortfolioProviderThe portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
transactionIdGenerator
IdGeneratorTransaction id generator.
Properties
CurrentTime
Current time, which will be passed to the Time.
public override DateTimeOffset CurrentTime { get; }
Property Value
ExchangeInfoProvider
Exchanges and trading boards provider.
public IExchangeInfoProvider ExchangeInfoProvider { get; }
Property Value
OrderIdGenerator
The generator of identifiers for orders.
public IncrementalIdGenerator OrderIdGenerator { get; set; }
Property Value
- IncrementalIdGenerator
PortfolioProvider
The portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.
public IPortfolioProvider PortfolioProvider { get; }
Property Value
ProcessedMessageCount
The number of processed messages.
public long ProcessedMessageCount { get; }
Property Value
SecurityProvider
The provider of information about instruments.
public ISecurityProvider SecurityProvider { get; }
Property Value
Settings
Emulator settings.
public MarketEmulatorSettings Settings { get; }
Property Value
TradeIdGenerator
The generator of identifiers for trades.
public IncrementalIdGenerator TradeIdGenerator { get; set; }
Property Value
- IncrementalIdGenerator
TransactionIdGenerator
Transaction id generator.
public IdGenerator TransactionIdGenerator { get; }
Property Value
- IdGenerator
Methods
SendInMessage(Message)
Send message.
public bool SendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
Events
NewOutMessage
New message event.
public event Action<Message> NewOutMessage