Have a strategy that places "working" orders at defined prices on the close of a bar when the conditions are met.
The system starts the order process of submitted -> accepted but never gets to the working stage. (Previously it was going all the way through to "working" but had a cancel order problem.)
Then on the very next bar it starts the process of cancelling the order, which it should not do until 4 bars later, based on certain conditions. I have commented out the cancel order method but to no avail.
I am using the OnOrderUpdate method to manage my orders and using the following
EnterShortStopLimit(Quantity, entryPrice * TickSize, "selllmt");
EnterLongStopLimit(Quantity, entryPrice * TickSize, "buylmt");
to place the orders. They appear as dots on the screen to confirm they are at the correct prices.
So in essence why do they not become working orders and why do they get cancelled on the next bar?
If any one can point me in the right direction that would be great.
Thanks in advance
Comment