← Zurück

Исключение в StockSharp.Algo при остановке стратегии

Останавливал работающую стратегию, при остановке робот упал. В стратегии параметр CancelOrdersWhenStopping = true, перед тем как нажал остановить, висела активная заявка, которая в итоге не снялась.

Раньше такого никогда не было, поэтому не знаю, как такой баг еще раз воспроизвести. Похоже, ошибка не у меня.

S# 4.1.6 из box.com

В журнале Windows значится такое:


Приложение: robot.exe
Версия платформы: v4.0.30319
Описание. Процесс был завершен из-за необработанного исключения.
Сведения об исключении: System.ArgumentException
Стек:
   в #=q6OOsVt0jU6li3962Bc4BTP_SDQNJzZw7a_xJ9eDpXEI=.#=q0CEkaXIaiGHY4qxSGKEiqluc9Q0OF68lyDePIT6dDP4=(StockSharp.BusinessEntities.Order, Boolean)
   в StockSharp.Algo.BaseTrader.CancelOrder(StockSharp.BusinessEntities.Order)
   в StockSharp.Algo.Strategies.Strategy.#=qTUoMrDUJPAMfvqYs225nzVyfPPUltcsfJr7mg4rDD1A=(StockSharp.BusinessEntities.Order)
   в StockSharp.Algo.Strategies.Strategy.#=qs7HIBPMp2K6K8uK2JZaxr_gM_UPxqGaRmPsIy372u9lnqQt2jFoEJKsSDUp0lFq$(StockSharp.BusinessEntities.Order)
   в Ecng.Collections.CollectionHelper.ForEach[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Action`1<System.__Canon>)
   в StockSharp.Algo.Strategies.Strategy.#=qrQSEQToAIjy7zanZmRFCmIhNiBd5BXJ$JXepvuLeizs=()
   в StockSharp.Algo.Strategies.Strategy.#=qqMGhIBHCDA8zWbr6iKLM8qibs4Ea$ZveYoho8Y0u_Lc=(StockSharp.Algo.ProcessStates)
   в StockSharp.Algo.Strategies.Strategy.Stop()
   в Robot.MainWindow.Start_Click(System.Object, System.Windows.RoutedEventArgs)
   в System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   в System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   в System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   в System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
   в System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
   в System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   в System.Windows.Threading.DispatcherOperation.InvokeImpl()
   в System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   в System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   в System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   в System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   в System.Windows.Threading.DispatcherOperation.Invoke()
   в System.Windows.Threading.Dispatcher.ProcessQueue()
   в System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   в MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   в MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   в System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   в System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   в MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   в System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   в System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   в System.Windows.Threading.Dispatcher.Run()
   в System.Windows.Application.RunDispatcher(System.Object)
   в System.Windows.Application.RunInternal(System.Windows.Window)
   в System.Windows.Application.Run(System.Windows.Window)
   в Ux.App.Main()


War dieses Thema hilfreich?

Thema teilen

Kommentare (2)

Anmelden oder Konto erstellen, Melden Sie sich an oder registrieren Sie sich, um einen Kommentar zu hinterlassen

esper
esper

Могла эта заявка быть ранее отправлена на отмену?

NattyD
NattyD Autor

В теории могла, но после падения она осталась висеть в терминале. К сожалению лог в файл не писался, поэтому не могу сказать точно.