Table of Contents

Extended settings

Extended settings of HistoryEmulationConnector.

  • EmulationSettings.MarketTimeChangedInterval - time change event input interval. If trades generators are used, then the trades will be generated with this periodicity. The default is 1 minute.
  • MarketEmulatorSettings.Latency - The minimum value of the registered orders latency. By default, it is equal to TimeSpan.Zero, which means instant acceptance of the registered orders by the exchange.
  • MarketEmulatorSettings.MatchOnTouch - to execute the orders if the price "touches" the level (an assumption is sometimes too "optimistic" and the mode must be switched off for a realistic testing). If the mode is off, then limit orders will be executed if the price is "passed through them" at least in 1 step. The option is available in all modes except the order log. The default is off.

Even if the strategy is tested on the candles, it is necessary to subscribe to the tick trades:

		_connector.SubscribeTrades(security);
		

If the strategy needs the order books, it is necessary to subscribe to the order books:

		_connector.SubscribeMarketDepth(security);
		

If there are no order books, then to check the working ability of strategies that need order books, it is possible to enable the generation:

var mdGenerator = new TrendMarketDepthGenerator(connector.GetSecurityId(security));
_connector.MarketDataAdapter.SendInMessage(new GeneratorMessage
{
    IsSubscribe = true,
    Generator = mdGenerator
});