Dodano po 3 minutach:
Po osiągnięciu X pipsów, EA przestawia SL na cenę otwarcia pozycji.
Kod: Zaznacz cały
 extern int be = X;Kod: Zaznacz cały
  for(int x=total; x>=0; x--) 
      {  
         if(OrderSelect(x,SELECT_BY_POS,MODE_TRADES)) 
            {     
               if(OrderType()==OP_BUY) 
                  { 
                     if(OrderOpenPrice()+be*Point < Ask && OrderStopLoss()<OrderOpenPrice()) 
                        {  
                        OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,CLR_NONE); 
                        } 
                  } 
               if(OrderType()==OP_SELL) 
                  {  
                     if(OrderOpenPrice()-be*Point > Bid && OrderStopLoss()>OrderOpenPrice()) 
                        {  
                        OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,CLR_NONE); 
                        } 
                  }  
            } 
      }  
							









