Why won't this code compile correctly?
hello, I'm stuck on this code trying to get the results of open tickets but I get errors.
semicolon expected and unexpected end of program...
int start()
{
for (int i=0; i<OrdersTotal();i++)
{ // check all orders
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)
{
break;
}
Print(OrderTicket(), " ", OrderSymbol(), " ", OrderOpenPrice())
}
return(0);
}
if you look after the error it will show you the line number and the position number.
int start() { for (int i=0; i<OrdersTotal();i++) { // check all orders if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) { break; } Print(OrderTicket(), " ", OrderSymbol(), " ", OrderOpenPrice()); } return(0); }
if you look after the error it will show you the line number and the position number.
int Total; Total=OrdersTotal(); for (int i=0; i<Total;i++)
hello, I'm stuck on this code trying to get the results of open tickets but I get errors.
semicolon expected and unexpected end of program...
int start()
{
for (int i=0; i<OrdersTotal();i++)
{ // check all orders
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)
{
break;
}
Print(OrderTicket(), " ", OrderSymbol(), " ", OrderOpenPrice())
}
return(0);
}