-----Original Message----- From: [email protected] <[email protected]> On Behalf Of Orionn via groups.io Sent: 04 February 2021 14:58 To: [email protected] Subject: Re: [TWS API] Place a Limit Order with 2 Profit Takers and 1 Stop Loss for a Stock
My suggestion is that you create two sets of orders. Each set includes the parent limit order and two attached OCA child orders (profit taker and stop loss). The limit price of the profit taker orders is different on each set of orders. To update the stop loss orders, just monitor the status of the profit taker order in the first set (wait for a fill) and then place the stop loss orders again with modified prices. You may simply trigger the stop loss order modification when the first profit taker order fills. Hope this helps.