My strategy has a condition to close all the position at certain point. Also the sync and immediately submit option is enabled in the strategy. It is connected with Gateway to Interactive broker.
After my strategy closed all the 76 shares buy positions by ExitShort(); with opening buy order for 76 shares.
Then this error Occurred:
Order rejected-reason: Cannot cancel the field order affected Order: Buy to cover 76 Market
Then another Buy order has been submitted and executed for 76 shares.
I had to close them all manually.
Question is why it happens? to prevent it in future.
If the logs and traces are needed I can provide them.
Any comment would be appreciated.
Thanks in advance.
Godric
Comment