Hello ,
i need help i realy dont know what i fucked with code buy EA give me all the times ERROR on Modify !
The code :
i need help i realy dont know what i fucked with code buy EA give me all the times ERROR on Modify !
The code :
PHP Code
for (i=0;i<=OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if (OrderSymbol()==Symbol() && OrderType()<=OP_SELL)
{
if (OrderType()==OP_BUY)
{
diff=(Bid-OrderOpenPrice())/Point;
if (diff>=270 && OrderStopLoss()>=0)
{
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,GreenYellow);
}
}
if (OrderType()==OP_SELL)
{
diff=(OrderOpenPrice()-Ask)/Point;
if (diff>=270 && OrderStopLoss()>=0)
{
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,GreenYellow);
}
}
}
}