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);

}


 
Neal_Van:

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);

}
 
Marco vd Heijden:

if you look after the error it will show you the line number and the position number.

lol... i don't know what i was thinking.. sorry for posting.  i clearly see the error... 
 
int Total;
Total=OrdersTotal();
for (int i=0; i<Total;i++) 
Reason: