HistoryEmulationConnector для двух инструментов
Здравствуйте.
Как правильно создать HistoryEmulationConnector для двух инструментов, если candleManager.Start(this ICandleManager manager, CandleSeries series) только для одного инструмента
var security1 = new Security
{
Id = "SBER@TQBR",
Code = "SBER",
Board = _exchangeInfoProvider.GetOrCreateBoard("TQBR")
};
var candleManager = new CandleManager((Connector)connector);
var seriesSecurity1 = new CandleSeries(typeof(TimeFrameCandle), security1, timeFrame)
{
BuildCandlesMode = emulationInfo.UsedCandleTimeFrame == null ? BuildCandlesModes.Build : BuildCandlesModes.Load
};
var portfolio = new Portfolio
{
Name = "Test Arbitrage Account",
BeginValue = 1000000,
};
var connector = new HistoryEmulationConnector(new[] { security1, security2 }, new[] { portfolio })
{
EmulationAdapter =
{
Emulator =
{
Settings =
{
// match order if historical price touched our limit order price.
// It is terned off, and price should go through limit order price level
// (more "severe" test mode)
MatchOnTouch = false,
}
}
},
CreateDepthFromOrdersLog = emulationInfo.IsUseOrderLog,
CreateTradesFromOrdersLog = emulationInfo.IsUseOrderLog,
HistoryMessageAdapter =
{
StorageRegistry = storageRegistry,
// set history range
StartDate = startTime,
StopDate = stopTime,
OrderLogMarketDepthBuilders =
{
//{
// secId,
// LocalizedStrings.ActiveLanguage == Languages.Russian
// ? (IOrderLogMarketDepthBuilder)new PlazaOrderLogMarketDepthBuilder(secId)
// : new ItchOrderLogMarketDepthBuilder(secId)
//}
}
},
// set market time freq as time frame
MarketTimeChangedInterval = timeFrame,
};
candleManager.Start(seriesSecurity1); - исключение (An exception of type 'System.ArgumentException' occurred in StockSharp.Algo.dll but was not handled in user code
Additional information: Серия TimeFrameCandle_SBER@TQBR_00-01-00 не была остановлена.)