Login Page - Create Account

Support Board


Date/Time: Mon, 13 May 2024 12:33:53 +0000



Post From: SC via Interactive Brokers not correctly setting OCO orders - important!

[2015-05-03 20:22:42]
i960 - Posts: 360
When the order is filled TWS communicates to the client the fill and quantity, correct? So assuming it does that and adjust offset is also used then adjust offset simply does an adjustment for only the quantity of the order that was filled and the remainder of the order remains.

I don't get what the problem is here. The client has an idea of what the quantity is and the "server" (in this case TWS) communicates to the client what was capable of being filled. It never guaranteed that an entire order could be filled so attach or not shouldn't matter. The client should simply not assume the entire order was filled when modifying the existing order.

If you're doing something client side like adjusting orders then you must ensure that all assumptions carried out are true. That has nothing to do with over accomidating user requests at all. It's basic client/server state management. IMO the code is trying to get away with doing as little as possible here when it quite simply cannot do that if it wants to be accurate.

I don't see how this is a difficult programming exefcise. Partial fill? Then partially adjust.