S# - 4.0.23 СТратегия 1 является родительской, стартагия 2 - дочерней. Произошло такое, что вижу в первый раз. дочерная стратегия была запушена два раза. лог. b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 OnStarting0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 SendBuyOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 CancelOrder 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 OnStopped b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 RegisterOrder 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 OnStarting1 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 OnStarting0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 SendBuyOrder
Как видно, запись OnStarting0 повторяется, это говорит о повторном старте данного экземпляра стратегии. Код
protected override void OnStarting()
{
WriteDiagnostics("OnStarting0");
base.OnStarting();
WriteDiagnostics("OnStarting1");
}
Comentarios (6)
Iniciar sesión o Crear cuenta, Inicie sesión o regístrese para dejar un comentario
а с чего вы взяли, что b6246d03-2331-41a2-97e2-ffdf69ee76ce - дочерняя стратегия?
покажите как стартуете основную и дочернюю стратегии
Старт основной.
Старт дочерней
b6246d03-2331-41a2-97e2-ffdf69ee76ce - это точно дочерния. Она промаркирована как ARBR . Значит дочерняя. Я просто не весь лог привел, он слишком объемный.
Вставьте распечатку перед стартом основной стратегии и дочерней. Дабы убедиться, что они запускаются 1 раз. Ибо на 99% уверен что у вас запускается 2 раза.
Запуск дочерней страты
запуск дочерный предваряется выводом StartAR, а эта строка в лог только один раз. Это лог того же запуска.
Лог. 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 _waitingPeriod 00:00:30 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 StartCR 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 FormTask КP Test 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 Start 17560,00 17560,00 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 _waitingPeriod 00:00:30 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 FirstActiveNewRegime 0 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 CreateOrder OnStarting Log CancelOldOrders False 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 IsMatched 40229066 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 DeactiveRule 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:13 order.GetMatchedVolume= 5 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 consStrategy_StrategyStop 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 StartAR 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 FormTask АP Test 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 OnStarting0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 SendBuyOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 0 Log Block SendBuyOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 SendBuyOrder 17558 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 SendBuyOrder 6 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 GetCurPrice 17560,00 0 Log ============ LKM2 04.04.2012 11:11:13
Log CancelOldOrders False b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 GetBalance 0 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 WaitAllInfoAboutOrder True False b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 PrepareCancelOrder 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 CancelOrder 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 OnCancelFailed Код ошибки Failed Сообщение Вы не можете снять данную заявку 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 WaitAllInfoAboutOrder True True Log UnBlock WaitAllInfoAboutOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 _unRealizedVolume 0 Log FireReceiveFinalPosition False True b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 Fire 5 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 _aggrStrategy_ReceiveFinalPosition 5 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 StartNextIter 9a7d85da-f9a6-48d5-b753-51f275c9dea6 AMRBR Buy LKM2 04.04.2012 11:11:13 StartNextIter 2 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:13 OnStopped Log ============ LKM2 04.04.2012 11:11:13
b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 ex Транзакция 'CLASSCODE=SPBFUT; SECCODE=LKM2; TRANS_ID=40229068; ORDER_KEY=2746267857; ACTION=KILL_ORDER;' не была зарегистрирована. Причина 'Вы не можете снять данную заявку'. b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 RegisterOrder 40229067 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 OnStarting1 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:14 OnStopped 53b49c2d-c796-43b1-8c8b-e63915469f5d CRBR Buy LKM2 04.04.2012 11:11:14 RegisterOrder 40229066 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 OnStarting0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 SendBuyOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 GetCurPrice 17560,00 0 Log Block SendBuyOrder b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 SendBuyOrder 17557 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 SendBuyOrder 6 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 GetCurPrice 17560,00 0 b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 RegisterOrder Объем заявки не может быть нулевым. Имя параметра: order b6246d03-2331-41a2-97e2-ffdf69ee76ce ARBR Buy LKM2 04.04.2012 11:11:14 RegisterOrder 0 Log UnBlock SendSellOrder
Не может же у двух разных основных стратегий совпасть Id дочерних.
Да, я вставил ещё доп.вывод ,но сейчас ошибка не воспроизводится.
Связано с этим