Добрый день 🙂 Подскажите пожалуйста почему при тестировании на истории, на временных интервалах включающих в себя 31 марта, может возникать данная ошибка.
HistoryEmulationConnector 31.03.2013 3:00:00 Error System.ArgumentException: Полученное значение DateTime не соответствует допустимому значению времени. Например, при переводе часов вперед любое время, приходящееся на пропущенный период, считается недействительным. Имя параметра: dateTime в System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData) в System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone) в StockSharp.Algo.TraderHelper.ToExchangeTime(Exchange exchange, DateTime time, TimeZoneInfo sourceZone) в StockSharp.Algo.TraderHelper.ToExchangeTime(Exchange exchange, DateTime time) в StockSharp.Algo.TraderHelper.ToExchangeTime(Security security, DateTime localTime) в StockSharp.Algo.TraderHelper.GetMarketTime(Security security) в StockSharp.Algo.Strategies.Strategy.get_CurrentTime() в StockSharp.Algo.Strategies.StrategyHelper.IsTradeTime(Strategy strategy) в StockSharp.Algo.Strategies.Strategy.#=qxdcmix6Yt3vNn7FTildS2RiGPsqSxsMZFb2ckCKUYp8=(TimeSpan #=qCdPJIq2RJXHLF$CkyhQoOg==) в System.Action
1.Invoke(T obj) в Ecng.Common.DelegateHelper.SafeInvoke(Action1 handler, T arg) в StockSharp.Algo.Connector.#=qyZBfUUSM4onnfQ$9MuxukDko_3F6qNOdwtO9hmuyWm0=(TimeSpan #=qhLVGNCMGdxX9Ur4pUz60VQ==) в StockSharp.Algo.Connector.#=qcxr_QEMxh$YcQgzX80oDdHIKs5eisSWh1$_PFpeShsQ=() в StockSharp.Algo.Connector.OnProcessMessage(Message message, MessageAdapterTypes adapterType, MessageDirections direction) в StockSharp.Algo.Testing.BaseEmulationConnector.OnProcessMessage(Message message, MessageAdapterTypes adapterType, MessageDirections direction) в StockSharp.Algo.Testing.HistoryEmulationConnector.OnProcessMessage(Message message, MessageAdapterTypes adapterType, MessageDirections direction)
Kommentare (1)
Anmelden oder Konto erstellen, Melden Sie sich an oder registrieren Sie sich, um einen Kommentar zu hinterlassen
Локализуйте время, подписавшись на событие Connector.MarketTimeChanged. Вот тут различные рецепты. http://stackoverflow.com/questions/2416439/exception-calling-when-timezoneinfo-converttimetoutc-for-certain-datetime-values