My idea for the modification is to remove the Take Profit & Stop Loss and add a function closing the previous order when opposite signal form. Example, MA5 cross up MA21 = buy order MA5 cross down MA21 = close previous buy order AND sell new order MA5 cross up MA21 = close previous sell order AND