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:
lol... i don't know what i was thinking.. sorry for posting. i clearly see the error...
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++)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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);
}