private void Start_Click(object sender, RoutedEventArgs e) { _security = new Security { Id = "SBER@TQBR", Code = "SBER", PriceStep = 0.01m, Board = ExchangeBoard.Micex, }; _portfolio = new Portfolio { Name = "test account", BeginValue = 1000000 }; var storageRegistry = new StorageRegistry { DefaultDrive = new LocalMarketDataDrive(_hystoryPath), }; _connector = new HistoryEmulationConnector(new[] { _security }, new[] { _portfolio }) { HistoryMessageAdapter = { StorageRegistry = storageRegistry, StorageFormat = StorageFormats.Csv, StartDate = new DateTime(2017, 10, 01).ChangeKind(DateTimeKind.Utc), StopDate = new DateTime(2017, 10, 31).ChangeKind(DateTimeKind.Utc), }, }; _candleSeries = new CandleSeries(CandleSettingsEditor.Settings.CandleType, _security, CandleSettingsEditor.Settings.Arg) { BuildCandlesMode = MarketDataBuildModes.Load, BuildCandlesFrom = MarketDataTypes.Trades, }; InitChart(); _connector.RxNewSecurity().Where(sec => sec == _security).Subscribe(Connector_RxNewSecurity); _connector.Connect(); }