Table of Contents

Class MarketEmulatorSettings

Namespace
StockSharp.Algo.Testing
Assembly
StockSharp.Algo.dll

Settings of exchange emulator.

public class MarketEmulatorSettings : NotifiableObject, IPersistable
Inheritance
MarketEmulatorSettings
Implements
IPersistable
Derived
Extension Methods

Constructors

MarketEmulatorSettings()

Initializes a new instance of the MarketEmulatorSettings.

public MarketEmulatorSettings()

Properties

AllowStoreGenerateMessages

Allow store generated by IMarketEmulator messages.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Storage", GroupName = "BacktestExtra", Order = 219)]
public bool AllowStoreGenerateMessages { get; set; }

Property Value

bool

CandlePrice

[Display(ResourceType = typeof(LocalizedStrings), Name = "Candle", Description = "CandleExecPrice", GroupName = "BacktestExtra", Order = 200)]
public EmulationCandlePrices CandlePrice { get; set; }

Property Value

EmulationCandlePrices

CheckMoney

Check money balance.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Money", Description = "CheckMoney", GroupName = "BacktestExtra", Order = 218)]
public bool CheckMoney { get; set; }

Property Value

bool

CheckShortable

Can have short positions.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Shortable", Description = "ShortableDesc", GroupName = "BacktestExtra", Order = 218)]
public bool CheckShortable { get; set; }

Property Value

bool

CheckTradableDates

Check loading dates are they tradable.

[Display(ResourceType = typeof(LocalizedStrings), Name = "CheckDates", Description = "CheckDatesDesc", GroupName = "Backtest", Order = 106)]
public bool CheckTradableDates { get; set; }

Property Value

bool

CheckTradingState

Check trading state.

[Display(ResourceType = typeof(LocalizedStrings), Name = "SessionState", Description = "CheckTradingState", GroupName = "BacktestExtra", Order = 217)]
public bool CheckTradingState { get; set; }

Property Value

bool

CommissionRules

Commission rules.

[Display(ResourceType = typeof(LocalizedStrings), GroupName = "Backtest", Name = "Commission", Description = "CommissionDesc", Order = 110)]
public IEnumerable<ICommissionRule> CommissionRules { get; set; }

Property Value

IEnumerable<ICommissionRule>

ConvertTime

To convert time for orders and trades into exchange time. By default, it is disabled.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ConvertTime", Description = "ConvertTimeDesc", GroupName = "BacktestExtra", Order = 213)]
public bool ConvertTime { get; set; }

Property Value

bool

Failing

The percentage value of new orders registration error. The value may be from 0 (not a single error) to 100. By default is Off.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ErrorPercent", Description = "ErrorPercentDesc", GroupName = "BacktestExtra", Order = 202)]
public double Failing { get; set; }

Property Value

double

IncreaseDepthVolume

To add the additional volume into order book at registering orders with greater volume. By default, it is enabled.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ExtraVolume", Description = "ExtraVolumeDesc", GroupName = "BacktestExtra", Order = 216)]
public bool IncreaseDepthVolume { get; set; }

Property Value

bool

InitialOrderId

The number, starting at which the emulator will generate identifiers for orders Id.

[Display(ResourceType = typeof(LocalizedStrings), Name = "OrderId", Description = "OrderIdGeneration", GroupName = "BacktestExtra", Order = 206)]
public long InitialOrderId { get; set; }

Property Value

long

InitialTradeId

The number, starting at which the emulator will generate identifiers fir trades Id.

[Display(ResourceType = typeof(LocalizedStrings), Name = "TradeId", Description = "TradeIdGeneration", GroupName = "BacktestExtra", Order = 207)]
public long InitialTradeId { get; set; }

Property Value

long

Latency

The minimal value of the registered orders delay. By default, it is Zero, which means instant adoption of registered orders by exchange.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Latency", Description = "LatencyDesc", GroupName = "BacktestExtra", Order = 203)]
public TimeSpan Latency { get; set; }

Property Value

TimeSpan

MatchOnTouch

At emulation of clearing by trades, to perform clearing of orders, when trade price touches the order price (is equal to order price), rather than only when the trade price is better than order price. Is On by default (optimistic scenario).

[Display(ResourceType = typeof(LocalizedStrings), Name = "MatchOnTouch", Description = "MatchOnTouchDesc", GroupName = "BacktestExtra", Order = 201)]
public bool MatchOnTouch { get; set; }

Property Value

bool

MaxDepth

The maximal depth of order book, which will be generated from ticks. It used, if there is no order book history. By default equals to 5.

[Display(ResourceType = typeof(LocalizedStrings), Name = "DepthOfBook", Description = "DepthOfBookDesc", GroupName = "BacktestExtra", Order = 210)]
public int MaxDepth { get; set; }

Property Value

int

PortfolioRecalcInterval

The interval for recalculation of data on portfolios. If interval equals Zero, recalculation is not performed.

[Display(ResourceType = typeof(LocalizedStrings), Name = "PortfoliosInterval", Description = "PortfoliosIntervalDesc", GroupName = "BacktestExtra", Order = 212)]
public TimeSpan PortfolioRecalcInterval { get; set; }

Property Value

TimeSpan

PriceLimitOffset

The price shift from the previous trade, determining boundaries of maximal and minimal prices for the next session. Used only if there is no saved information Level1ChangeMessage. By default, it equals to 40%.

[Display(ResourceType = typeof(LocalizedStrings), Name = "PriceShift", Description = "PriceShiftDesc", GroupName = "BacktestExtra", Order = 215)]
public Unit PriceLimitOffset { get; set; }

Property Value

Unit

SpreadSize

The size of spread in price increments. It used at determination of spread for generation of order book from tick trades. By default equals to 2.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Spread", Description = "SpreadSizeDesc", GroupName = "BacktestExtra", Order = 209)]
public int SpreadSize { get; set; }

Property Value

int

TimeZone

Information about the time zone where the exchange is located.

[Display(ResourceType = typeof(LocalizedStrings), Name = "TimeZone", Description = "BoardTimeZone", GroupName = "BacktestExtra", Order = 214)]
public TimeZoneInfo TimeZone { get; set; }

Property Value

TimeZoneInfo

Methods

Load(SettingsStorage)

To load the state of paper trading parameters.

public virtual void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Storage.

Save(SettingsStorage)

To save the state of paper trading parameters.

public virtual void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Storage.