Open helhadry opened 1 month ago
What could be happening:
trailing_stop_order
is submitted without an account idplace_order()
updates trailing_stop_order
to populate the account idstop_loss_order
is submitted without an account id tooThe more standard way of doing this would be to use parent orders if everything is submitted at once (buy <- {sell loss, sell, profit}
): https://interactivebrokers.github.io/tws-api/bracket_order.html
Or you could manually add your account id to every order too.
Hello,
I get this error while creating the trail and the stop order using the one cancels all logic (OCA), it's working fine in the paper account but not in the live account, below is the error message:
ERROR - Error 10224, reqId 673: One-cancels-all group of orders should contain orders with exactly the same account. OCA group '0913e328-d9c4-4b4a-99b8-f6b921824f25' contains orders for Personal Account (account_name), Undefined.
What can be the issue here please ? below is the code if this help :
oca_group_name = str(uuid.uuid4())
Thanks, Hamza