I have an issue with canceled FOREX trades with IB due to partially filled entry orders. It happens very often.
IB automatically routes FOREX orders to its “Exchange” IDEALPRO. When an order size is smaller than certain size, it will also re-route it to IDEAL, of course without trader intervention.
The problem arises with matching stop and target orders when entry order is partially filled. Some partially filled orders will have position size smaller than IB specified size for IDEALPRO. The following stop and target orders will be rejected when using execution.Order.Filled as the quantity in OnExEcution().
After detecting rejected stop and target orders, the NinjaTrader will close the whole position. At the same time, IB is trying to re-route these IDEALPRO-rejected orders to IDEAL.
I am thinking to get the cumulative filled quantities in pre-determined time instead of submit stop and target orders immediately for each execution. Not sure if this is the solution.
Any suggestions are welcome.
Comment