I am using the unmanaged approach and want to verify how to cancel the remainder of an entry order if a partial fill is received.
I can have a situation where I have a partial fill then decide to exit the position prior to getting a full fill reported. I am managing my profit target and stop loss prices and position sizes.
I want to make sure there aren't any gotcha's if I simply issue a CancelOrder referencing my IOrder variable. My intent is to only cancel the remaining portion of the original entry order leaving all other orders and more importantly any associated NinjaTrader internal variables intact.
The actual logic to decide to cancel the remaining portion is quite complicated and I would rather verify I am coding this correctly prior to starting the code as opposed to just trying it and see what happens.
I also plan to manage any fills that cross my cancel in the same fashion as I would under any other circumstances where I have an unexpected fill (unless for some technical reason that is not possible).
Thanks in advance.
Scott
Comment