So, canceling the existing orders and submitting a new bracket order in a quantity of 20 doesn't quite do what I need. (I want the children to close out the net position of 80.)
What would work, but I don't think is possible, is canceling existing orders and submitting a funny bracket order...
Say I established a long position of 100 contracts using a bracket order.
The parent of the bracket has filled, and the take profit / stop loss are outstanding (in a quantity of 100 each).
I now want to trim this position to 80 contracts. Is there a way I can place an order to sell 20...
Yeah, your approach is understandable. Our engineering is just not as robust (recovery from failure, race conditions, etc.) as we'd need it to be before attempting to do it ourselves.
Regardless, I need to double-check with IB on all this.
Thanks @HobbyTrading. I've seen those -- pretty comfortable with the OCA group part. It's specifically getting an OCA group (with a GAT in it) to follow a parent's size that I'm hoping @southall can confirm he's done.
And the API docs don't inspire confidence. E.g., the bit on attaching...
Thanks all for your responses!
@southall Yeah, I'd really like fire-and-forget for this too. Two questions, if I may:
So, children become active when parent partially fills. But just to make doubly sure -- in your experience, children stay active in partial fill size even after the parent...
What I'd like to do:
Enter using a limit order that expires after [30] minutes. Attach a stop loss.
Exit automatically after [4] hours using a market order (which would cancel the stop loss).
Ideally, this would be transmitted in one go to minimize risk from disconnects. I'm looking into...