开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Place a Limit Order with 2 Profit Takers and 1 Stop Loss for a Stock


 

开云体育

Place your limit order on its own (or with just a protective stop-loss in case you lose your connection before you do the next bit).

?

When the limit order is filled, place two separate OCA orders, each with a profit taker and a stop loss, and each for half the quantity (or whatever proportions you want), and cancel the original protective stop loss if any.

?

Note that there is still a tiny risk of trouble due to some sort of failure during the second part of this, but if you submit the two OCAs and do the cancel immediately consecutively you'd have to be very unlucky to get caught out. But trading is never risk free…

?

Then you need to consider things like partial fills etc, but you can work that out for yourself!

?

?

From: [email protected] <[email protected]> On Behalf Of Pavan M
Sent: 03 February 2021 16:43
To: [email protected]
Subject: [TWS API] Place a Limit Order with 2 Profit Takers and 1 Stop Loss for a Stock

?

Hello,

I am using Python TWS API. For a Stock, I want to place a Limit Order with 2 Profit Takers and 1 Stop Loss. If Profit Taker 1 is hit, then the stop loss should decrease by the commensurate amount (so after Profit Taker 1 is hit, the stop loss quantity is now updated to be equal to Profit Taker 2 quantity). How to do this ?

?

I have tried a Bracket Order with Two Profit Takers as . But as soon as Profit Taker 1 is hit, Profit Taker 2 and the Stop Loss is auto cancelled.?

?

How do I place a Limit Order with Two Profit Takers and 1 Stop Loss for a Stock ?

?

Thank You.

--
Best Regards,
Pavan

Join [email protected] to automatically receive all group messages.