1. I subscribe to Order Update Event.
2. Upon Order Update , I check with the Status is "Change Pending" , if so
- I get all the Orders with the same oco as this order in this Account, store the changed value of the oco-leg being modified and the current value of the other oco-leg into a variable and cancel them both.
- then I get the current position and create new oco bracket with the stored values and same quantity as position
This seem to be working. However I have one question
- I see that first time when ATM strategy triggers modification of orders , above logic gets executed and the new OCO bracket created
Question is whether my original ATM Strategy is still running , will it trigger its second modification to trigger the Order Update Event on new OCO leg(s)
Comment