Orders in mediation

 

here's what I want you to do my

 

1 - once opened my order , my and analyze it and see at what price it is open 2 - if it is open to a price level which is fine for me and the order closes in positive then go ahead and open another order WHEN IT ' CLOSED IN PROFITS THE PREVIOUS 3 - then if you also closes this second order in a positive open my third and final order, and if it reaches a price I decided change take profit

 

 

 

OrderSend(Symbol(),OP_BUY,Lotti_1,Ask,0,StopLoss1,TakeProfit1,"ordine1",Magic1,0,Blue);
  
         if (OrderOpenPrice() < Open[X]) && (OrderClosePrice()> OrderOpenPrice()) &&  !OrdersTotalByMagic(Magic1) ) 
         { OrderSend(Symbol(),OP_BUY,Lotti_1,Ask,0,StopLoss2,TakeProfit2,"ordine2",Magic2,0,Blue);  }

         if (OrderClosePrice()> OrderOpenPrice() &&  !OrdersTotalByMagic(Magic2))
         {OrderSend(Symbol(),OP_BUY,Lotti_1,Ask,0,StopLoss3,TakeProfit3,"ordine3",Magic3,0,Blue); }
         }
          if (OrderOpenPrice(Magic3) > Open[X])
          OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NewTakeProfit,0,Yellow);
          

 

 

but it gives me problems . ordermodify does not work , and other problems

 

HELP 

 

 

Reason: