Login Page - Create Account

Support Board


Date/Time: Mon, 13 May 2024 03:27:35 +0000



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

[2015-05-03 22:49:40]
i960 - Posts: 360
So what you're saying is that the client being overly defensive against a potential race condition is unreliable? Absolutely amazing.

Let's review again so somehow the logic can sink in:

1. Order partially filled.
2. Client sends modify for fill offset. (race condition here)
3. In parallel TWS sends new quantity across wire. (race condition here)
4. SC does nothing to correct the situation that it just created by modifying attached order to match fill offset even though TWS just gave it additional information from which to correct it.

And somehow you classify defensiveness for that self-created situation as "unreliable" because it involves actually writing more code to be defensive against a situation you already know you have to be aware of in the first place. On top of that, the recommendation is basically "turn off feature that creates problem" rather than fix said feature that creates problem.

What you are avoiding here is the reality that your current code *is already making assumptions*. It's entirely riddled with assumptive behavior and when assumptions are broken you're quite quick to blame the other side.
Date Time Of Last Edit: 2015-05-03 22:51:54