Help in Break Even

 

Hello dear Traders :
******************


I need to make Break Even for 2 orders with the same symbol simultaneously


I get error 130 and error 1
Any Ideas?

Here is the code :

 

void Break_Even() { {   if(OpenOrdersThisPair(Symbol())==2)   if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES))   if(OrderMagicNumber()==MagicNumber)   if(OrderSymbol()==Symbol())   if(OrderType()==OP_BUY)   if(Ask-OrderOpenPrice() >= NormalizeDouble(BreakEvenPercent*(OrderTakeProfit()-OrderOpenPrice()),Digits))   if(OrderOpenPrice() > OrderStopLoss())    {     modify=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0);    }     OpenPrice=OrderOpenPrice();     select=OrderSelect(1,SELECT_BY_POS,MODE_TRADES);    {     modify=OrderModify(OrderTicket(),OrderOpenPrice(),OpenPrice,OrderTakeProfit(),0);    }        } }





 

    select=OrderSelect(1,SELECT_BY_POS,MODE_TRADES);
   {
    modify=OrderModify(OrderTicket(),OrderOpenPrice(),OpenPrice,OrderTakeProfit(),0);
   } 
This is completely independent of any conditions so will be executed every time the function is called.
 
This is completely independent of any conditions so will be executed every time the function is called.
Thnx for tip
 
Thnx Guys EA Done!! :D