I've got an advanced strategy in the works that uses Unmanaged order processing.
The scenario that I'm seeing occurs when I call ChangeOrder from within OnBarUpdate().
What I'm seeing is that sometimes before the Change order request completes transitioning through all of the order states back to OrderState.Working, another OnBarUpdate is coming through which is causing me some issues...
So, first, can someone confirm that OnBarUpdate and OnOrderUpdate are each executing in separate threads? Assuming that the answer is yes, are there any built in synchronization objects that exist to help coordinate execution between the two threads?
If not, does anybody have any recommendations on the ideal way to deal with this in Ninja? I can create my own mutex or critcal section if necessary, just wondering if there's a prescribed way that Ninja suggests handling this issue...
Thanks,
Dave
Comment