I have generated a general Strategy for all test that i can imagen on real money and account but nothing works like expected. :-(
Strategy is very simple:
Opens a LONG-Position by (EntryLong) on every (10, 20, 30, 40, 50) Minute for every Hour and holds this position für 5 Minutes.
If time if the current bar is (05, 15, 25, 35, 45, 55) Minute, LONG-Position would be closed by (ExitLong).
Start behavior for Strategy is set to (StartBehavior.ImmediatelySubmitSynchronizeAcco unt)!
While position was opened and still existing on account-side, i stop running strategy and restart them within 5 seconds.
With that activity i want to simulate any type of server or connection error.
Me expectation for NT respectively current strategy is, that current account position would be matched to strategy position and position administered by strategy while state (RealTime) is reached.
At the moment current account position would closed if i restart strategy and i don't understand why this happens!!!
I have read all documentation for several states and also use GetRealtimeOrder() convert any old historical order object references to the new live order on real-time account.
Is there somebody out there that can help me to modify current code to excepted result?
This would be gorgeous... :-)
With best regards,
Phil
Comment