Table of Contents

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 ISecurityProvider

The provider of information about instruments.

portfolioProvider IPortfolioProvider

The portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.

exchangeInfoProvider IExchangeInfoProvider

Exchanges and trading boards provider.

transactionIdGenerator IdGenerator

Transaction id generator.

Properties

CurrentTime

Current time, which will be passed to the Time.

public override DateTimeOffset CurrentTime { get; }

Property Value

DateTimeOffset

ExchangeInfoProvider

Exchanges and trading boards provider.

public IExchangeInfoProvider ExchangeInfoProvider { get; }

Property Value

IExchangeInfoProvider

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

IPortfolioProvider

ProcessedMessageCount

The number of processed messages.

public long ProcessedMessageCount { get; }

Property Value

long

SecurityProvider

The provider of information about instruments.

public ISecurityProvider SecurityProvider { get; }

Property Value

ISecurityProvider

Settings

Emulator settings.

public MarketEmulatorSettings Settings { get; }

Property Value

MarketEmulatorSettings

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 Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

Events

NewOutMessage

New message event.

public event Action<Message> NewOutMessage

Event Type

Action<Message>