I have a strategy that uses unmanaged orders, but still used RealtimeErrorHandling.StopCancelCloseIgnoreRejects , so it SHOULD close all positions and disable the strategy if there is an error that occured.
In my case, I had a stop order that was for 2 contracts. The order overfilled, so I ended up with 2 more orders in the opposite direction than I wanted. Even worse, NT detected this and tried to close all my positions but what it actually did was enter 3 MORE positions in that direction! It seems there is a massive bug in NT that fails to properly detect what the current position actually is, and makes the situation even worse.
My original order was short for YM for 2 contracts. My stop was 20 points higher, and that overfilled, so I was left with 2 long positions. Then the strategy close operation added 3 more long positions so I ended up with 5 long positions. When I noticed this, YM had pulled back so I had to manually close for a big loss.
Obviously this is unacceptable behavior by the platform. I'd like to resolve this and find a way to make sure this never happens again. If RealtimeErrorHandling.StopCancelCloseIgnoreRejects is not reliable in actually closing the position, how should I go about doing this in my strategy code?

Comment