开云体育

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

Re: conditional order conditioned on execution of buy order only?


 

You can use Pair trade hedge type (Order.HedgeType = "P") which allows setting different quantities for the orders via the Order.HedgeParam property (as a ratio between the two order sizes). To ensure that the client side including last mile has no effect on the synchronicity of the price changes I would also deactivate both orders before making the changes and activate them thereafter. This can possibly be implemented via the provided Order.Transmit mechanism though I'm not sure if it offers a way to deactivate both orders momentarily, so my own preference would probably be to set the parent order's good-after-time to a distant future and then remove it again when ready.
?
But it also should be noted that changes to limit orders in the book are likely to cause order cancellation and new submission to the exchange under the hood, so it's probably easier to cancel the orders altogether and submit new ones.
?
--
Best,
DS

Join twsapi@groups.io to automatically receive all group messages.