I could not find an Order.State == Cancelled. When I run my strategy, at times, the order is cancelled and an entry opportunity is missed.
Qs:
1. What would cause this? The entry price is 2 ticks above the last price (long). The profit target is 4 ticks away, and stop loss is 8 ticks away. So none of them are too close to the entry price to collide.
2. I notice also NT says order is cancelled when in fact it has reached the profit target. It doesn't say Target Filled, but rather Cancelled, even so the position is filled and closed at the profit target.
I would like to handle the case where an order is cancelled and an entry is missed. Would be good to know why, but more important is I'd like to resubmit the order. Is it due to the price has moved to another bar?
Many Thanks, Caesar.
Comment