Download MetaTrader 5

OrdersHistoryTotal fail

To add comments, please log in or register
Gordon Gekko
623
Gordon Gekko  

Hi,

Why does OrdersHistoryTotal() show one more than the real value?

If I have say 12 closed trades, OrdersHistoryTotal() shows 13, even on a brand-new and "empty" account it shows 1.

Why? Is it a failure or am I wrong?

Thx

SYED NAUFAL GADDAFI
1402
SYED NAUFAL GADDAFI  
Show us the screenshots.
Gordon Gekko
623
Gordon Gekko  
deysmacro:
Show us the screenshots.

Why do you need screenshot?

This code shows 1 as a result on a new account without any trades.

int total=OrdersHistoryTotal();
Comment(total);
GreenMoney
379
GreenMoney  
Gordon Gekko
623
Gordon Gekko  
Thirteen:
See this thread and my reply.

Thank you Thirteen. So, the name of OrdersHistoryTotal doesn't reflect to its function.
To add comments, please log in or register