I'm curious to know what is the best approach to code to when using Interactive Brokers. While not 100% the same scenario, in this post: https://forum.ninjatrader.com/forum/...18#post1114218
Jim provides an approach to manage positions using only OnOrder updates and not OnExecution since the order / execution event order is not guaranteed with IB.
With this issue still around today, is the approach in the above link still the way to go?
I'm asking because in this newer post: https://forum.ninjatrader.com/forum/...72#post1206372
from Jim, both OnOrder and OnExecution are being used.
I'm looking for accurate position information and the best approach to take. Please let me know.
Thank you!
** After finding additional posts, I think I understand.
Basically write your code so OnOrder / OnExecution / OnPosition support being called out of order and if it happens, support not duplicating, missing, or breaking anything.

Comment