I've switched from Managed to Unmanaged to have more flexibility and the change to Unmanaged has resolved a lot of the issues I had before. Now, some new issues have appeared as well.
I've been testing my script on a Simulated Data Feed today and everything was functioning as supposed to, however, when I deployed my script on a real-time chart with a Live account the script has been submitting far too many orders than it should. See the attached image.
The only place where I reset my orders to null is in OnOrderUpdate() when Cancelled and in OnExecutionUpdate() when Filled.
Any ideas what could be going wrong here?
I'm looking forward to your reply.
Edit: I've been using this method in OnOrderUpdate() for a while now, could it be wrong to have the same "order" name for each one?
if (order.Name == "AL1")
AL1 = order;
if (order.Name == "AL2")
AL2 = order;
if (order.Name == "AL3")
AL3 = order;
if (order.Name == "AL4")
AL4 = order;
Comment