Several times now I have observed that the strategy will exit a position, and it will add the PnL to the "Realized Profit" column, but it will not set the "Unrealized Profit" and the "Average Price" columns back to zero.
More importantly though it does not cancel the non-executed order of the OCO exit order pair.
In my logging, I also do not see any log statement from the onExecution event for the exit order when it's hit, i.e. the strategy's onExecution event isn't fired.
This has happened twice in comparison to about 10 correct exits.
I also noticed that the orders are not submitted to IB as OCO. This is despite the checkbox "Local OCO Simulation" being not checked in the IB connection config.
This means that I am not safe from unintended consequences if my connection to the internet goes down for long - as it did last night due to a power black-out in my area of London, for 6 hours.
Comment