1) Create a limit order on lets say EMA(8) of the bar on which certain conditions are met,
2) and if order is not filled and the bar is completed, it will cancel the previous order and create a new limit order on the EMA(8) of the next bar.
3) The strategy should do this for 5 bars and if order is not filled, it should cancel the order.
I have programmed (1) and (3) and I need some help with (2).
Thanks

Comment