¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

combo order with stoploss and takeprofit


Erez Kaplan
 

I have a combo order running.
How does one add?stoploss and takeprofit to the single combo?


 

There's a good on the api website. Create a contract object with your combo legs, and then create a bracket object with your parent order, profit taker & stop loss. To submit you do a for loop to call the placeOrder method passing the orderId, contract object & order objects as parameters.


On Mon, Apr 11, 2022 at 10:25 AM Erez Kaplan <erezkaplan90@...> wrote:
I have a combo order running.
How does one add?stoploss and takeprofit to the single combo?


Erez Kaplan
 

I am familiar with such bracket orders.?

but how can I set an exit price?

parent.lmtPrice = limitPrice

I would like to use a percentage basis on the parent combo.?

note - this is intended for pair training?

?


 

is it a fixed percentage? why not just write the code to calculate

limitPrice = 100
takeProfitLimitPrice = limitPrice * 1.5
stopLimitPrice = limitPrice * 0.5
stopLimitAux = stopLimitPrice - 0.15
#parent order
parent.lmtPrice = limitPrice

#profit taker
takeProfit.lmtPrice = takeProfitLimitPrice

#stop limit
stopLimit.lmtPrice = stopLimitPrice
stopLimit.auxPrice = stopLimitAux

On Mon, Apr 11, 2022 at 9:41 PM Erez Kaplan <erezkaplan90@...> wrote:

I am familiar with such bracket orders.?

but how can I set an exit price?

parent.lmtPrice = limitPrice

I would like to use a percentage basis on the parent combo.?

note - this is intended for pair training?

?