Troubleshooting "Cannot have open order on both sides of the same US Option contract"

Modified on Wed, 14 Aug, 2024 at 11:15 PM

Why does this happen?


This is a rare issue, but it normally has the same cause. You will receive this error if TAT tries to place an order (typically when opening a new trade) with the same strikes as an existing position that already has a Stop order open. TWS/IBKR does not allow you to have orders to both buy and sell the same strikes at the same time.


This can happen when TAT has an incorrect AccountID when checking for existing open positions and strikes to avoid. This typically happens in one of the following situations:


- You copied your test database to be your live database, which left the paper trading accountID in the scheduled trades.

- You have multiple IBKR AccountIDs or changed AccountIDs recently and the account that is saved on the scheduled trades is not the account where the trades are actually being opened in TWS.



How to fix this issue?


The fix for this issue is usually quite simple. You need to connect TAT to TWS and then go through all of your scheduled trade entries to be sure they are tied to the correct IBKR AccountID and then re-save each entry. 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article