Then the strategy stops due to RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose; And sometimes leaves an unprotected position.
I’m moving the stops to follow up price action so probably at some points the target is filled & strat is still trying to move the stop up.
#1 Is there a way to improve this issue & not have it crash all the time?
#2 Failing any solution is there a way to check if any outstanding orders exist? What I would like to do is set RealtimeErrorHandling.IgnoreAllErrors
and every bar if there is a current position I would check if there is a stop & target order. If there’s not orders & an open position I will flatten position.
My goal is to keep the strategy running without having to stop & restart it every time there’s an error.
Any help appreciated.
Comment