Download MetaTrader 5
To add comments, please log in or register
Ask your broker to open the official channel. Thousands of traders will read the news!
Gordon Gekko
671
Gordon Gekko 2014.09.09 11:40 

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
1401
SYED NAUFAL GADDAFI 2014.09.09 12:33  
Show us the screenshots.
Gordon Gekko
671
Gordon Gekko 2014.09.09 12:56  
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 2014.09.09 13:11  
Gordon Gekko
671
Gordon Gekko 2014.09.09 13:39  
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