How to get a pending order to be updated on a new bar?

 

Hi!

I am kind of new to this and I am tying to get an OrderModify to execute on every new bar. I want to place a BUYSTOP and a SELLSTOP some ticks away from the current price and refresh the Price, StopLoss and TakeProfit on every BarClose. For example if I start by placing a BUYSTOP and a SELLSTOP at +/- 20 pips on the current price. Every time a new bar closes the BUYSTOP and SELLSTOP are to be updated to BUY and SELL at +/- 20 pips from that bars Close.

Best Regards // Tommy

Reason: