If our entry is executed a stop loss and take profit OCO pair are submitted by the strategy. These are both calculated on each bar update. This part is working for the execution bar but then at the open of the next bar the newly calculated stop loss and take profit are not being submitted. If I disable and re-enable the strategy the stop loss and target are submitted at the correct levels.
I want these stop loss and take profit orders to be dynamically re-calculated and re-submitted (modified) on each bar update (new daily bar).
I have not tested the system with GTC as the TIF, perhaps this would transfer from the entry order to the stop loss and take profit exit orders? However if this did prevent the current issue is there a way to then cancel the entry order at the end of each bar/day?
Any advice would be much appreciated.
Andy
Comment