Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Trying to place two sets of orders
Hello all.?
?
I am trying to place two option orders simultaneously (each with different quantity and target profit, but same entry price and stop loss) using ib_sync and xlwings on Interactive Brokers TWS. Below is the python script I am using. The orders get sent to TWS, but for some reason, one group of the orders just get cancelled a few seconds later without triggering! Screenshot below shows the orders on TWS, with order group 17, 17.2 and 17.1 getting cancelled a few seconds later for some reason! ? |
Below is the script I am using:
?
from ib_insync import * |
¿ªÔÆÌåÓýYou would have simultaneous buy & sell open orders on the same option contract. That's not allowed. Not an IBKR limitation, but a limitation of US option markets where only market makers can have simultaneous buy & sell orders open on the same option contract.
?
Since both your orders are at same entry price, you can just have 1 open order for the total qty, and then have 2 different close orders, each with its qty, profit & stop loss targets, and then just link them together in an OCA group so you get the overfill
protection.
rgds, Bart On May 5, 2025 at 2:19?PM -0700, nesbitcrab via groups.io <nesbitcrab@...>, wrote:
|
to navigate to use esc to dismiss