MarketEmulatorSettings

StockSharp.Algo.Testing

Settings of exchange emulator.

Inherits: NotifiableObject

Implements: IPersistable

Constructors

MarketEmulatorSettings
public MarketEmulatorSettings()
marketEmulatorSettings = MarketEmulatorSettings()

Initializes a new instance of the MarketEmulatorSettings.

Properties

AllowStoreGenerateMessages
public bool AllowStoreGenerateMessages { get; set; }
value = marketEmulatorSettings.AllowStoreGenerateMessages
marketEmulatorSettings.AllowStoreGenerateMessages = value

Allow store generated by IMarketEmulator messages.

CandlePrice
public EmulationCandlePrices CandlePrice { get; set; }
value = marketEmulatorSettings.CandlePrice
marketEmulatorSettings.CandlePrice = value

EmulationCandlePrices

CheckMoney
public bool CheckMoney { get; set; }
value = marketEmulatorSettings.CheckMoney
marketEmulatorSettings.CheckMoney = value

Check money balance.

CheckShortable
public bool CheckShortable { get; set; }
value = marketEmulatorSettings.CheckShortable
marketEmulatorSettings.CheckShortable = value

Can have short positions.

CheckTradableDates
public bool CheckTradableDates { get; set; }
value = marketEmulatorSettings.CheckTradableDates
marketEmulatorSettings.CheckTradableDates = value

Check loading dates are they tradable.

CheckTradingState
public bool CheckTradingState { get; set; }
value = marketEmulatorSettings.CheckTradingState
marketEmulatorSettings.CheckTradingState = value

Check trading state.

CommissionRules
public IEnumerable<ICommissionRule> CommissionRules { get; set; }
value = marketEmulatorSettings.CommissionRules
marketEmulatorSettings.CommissionRules = value

Commission rules.

ConvertTime
public bool ConvertTime { get; set; }
value = marketEmulatorSettings.ConvertTime
marketEmulatorSettings.ConvertTime = value

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

Failing
public double Failing { get; set; }
value = marketEmulatorSettings.Failing
marketEmulatorSettings.Failing = value

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

IncreaseDepthVolume
public bool IncreaseDepthVolume { get; set; }
value = marketEmulatorSettings.IncreaseDepthVolume
marketEmulatorSettings.IncreaseDepthVolume = value

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

InitialOrderId
public long InitialOrderId { get; set; }
value = marketEmulatorSettings.InitialOrderId
marketEmulatorSettings.InitialOrderId = value

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

InitialTradeId
public long InitialTradeId { get; set; }
value = marketEmulatorSettings.InitialTradeId
marketEmulatorSettings.InitialTradeId = value

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

Latency
public TimeSpan Latency { get; set; }
value = marketEmulatorSettings.Latency
marketEmulatorSettings.Latency = value

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

MatchOnTouch
public bool MatchOnTouch { get; set; }
value = marketEmulatorSettings.MatchOnTouch
marketEmulatorSettings.MatchOnTouch = value

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).

MaxDepth
public int MaxDepth { get; set; }
value = marketEmulatorSettings.MaxDepth
marketEmulatorSettings.MaxDepth = value

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.

PortfolioRecalcInterval
public TimeSpan PortfolioRecalcInterval { get; set; }
value = marketEmulatorSettings.PortfolioRecalcInterval
marketEmulatorSettings.PortfolioRecalcInterval = value

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

PriceLimitOffset
public Unit PriceLimitOffset { get; set; }
value = marketEmulatorSettings.PriceLimitOffset
marketEmulatorSettings.PriceLimitOffset = value

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%.

SpreadSize
public int SpreadSize { get; set; }
value = marketEmulatorSettings.SpreadSize
marketEmulatorSettings.SpreadSize = value

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.

TimeZone
public TimeZoneInfo TimeZone { get; set; }
value = marketEmulatorSettings.TimeZone
marketEmulatorSettings.TimeZone = value

Information about the time zone where the exchange is located.

Methods

Load
public virtual void Load(SettingsStorage storage)
marketEmulatorSettings.Load(storage)

To load the state of paper trading parameters.

storage
Storage.
Save
public virtual void Save(SettingsStorage storage)
marketEmulatorSettings.Save(storage)

To save the state of paper trading parameters.

storage
Storage.