I have been thoroughly testing today. Everything is going reasonable well.
I have encountered the following problem:
An order is submitted from inside OnBarUpdate.
It can take a second to go from accepted->working->filled.
In that time, a new TICK arrived. OnBarUpdate is retriggered and a new order is submitted. Like I said this happens in the space between accepted and filled.
I have been looking in the reference for a function/method that gives something along the lines of: OrderState that returns Working/Accepted etc... does this exist somewhere?
Also: I am seeing a lot of State=PendingChange. What causes this?
Comment