Логическая ошибка в проверке входных параметров в методе EmulationTrader.Start(startTime, stopTime);


Логическая ошибка в проверке входных параметров в методе EmulationTrader.Start(startTime, stopTime);
Atom
10/5/2011


AN

Avatar
Если передавать в EmulationTrader.Start(01.06.2009, 01.06.2009) - то он скажет, что нельзя эмулировать когда дата старта и окончания равны.
Логично, черт побери!

Т.е. чтобы посчитать один день указываем EmulationTrader.Start(01.06.2009, 02.06.2009)
А теперь EmulationTrader спокойно считает с начала 01.06.2009, до ОКОНЧАНИЯ 02.06.2009.

Так как мне поэмулировать за один день?



Thanks:


Alexander

Avatar
Date: 10/5/2011
Reply


AN Go to
Если передавать в EmulationTrader.Start(01.06.2009, 01.06.2009) - то он скажет, что нельзя эмулировать когда дата старта и окончания равны.
Логично, черт побери!

Т.е. чтобы посчитать один день указываем EmulationTrader.Start(01.06.2009, 02.06.2009)
А теперь EmulationTrader спокойно считает с начала 01.06.2009, до ОКОНЧАНИЯ 02.06.2009.

Так как мне поэмулировать за один день?


Версия?
Если не 4.0.1 - смотрите новую, исправляли.
Thanks:

AN

Avatar
Date: 10/5/2011
Reply


Попробовал в 4.0.1

Quote:
System.ArgumentOutOfRangeException was unhandled by user code
Message=Дата начала 01.06.2009 0:00:00 равна дате окончания.
Имя параметра: startDate
Фактическое значение было 01.06.2009 0:00:00.
Source=StockSharp.Algo
ParamName=startDate
StackTrace:
в StockSharp.Algo.Testing.EmulationTrader.Start(DateTime startDate, DateTime stopDate)
в SampleHistoryTestingParallel.MainWindow.StartBtn_Click(Object sender, RoutedEventArgs e) в C:\Dropbox\bot\s#\Samples\Testing\SampleHistoryTestingParallel\MainWindow.xaml.cs:строка 200
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
в System.Windows.Controls.Button.OnClick()
в System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
в System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
в System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
в System.Windows.Input.InputManager.ProcessStagingArea()
в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
в System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
в System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
InnerException:
Thanks:

Alexander

Avatar
Date: 10/6/2011
Reply


Так задайте время окончания другое - чтоб не совпадало. Хотя бы конец дня, а не 0:00
Thanks:


Attach files by dragging & dropping, , or pasting from the clipboard.

loading
clippy