Why HistoryDealsTotal & HistoryOrdersTotal returns bigger number than actual MT5 History Tab?
First of all, do you understand differences between Orders, Deals and Positions?
not sure if this might help. but try to limit the history to 1 day like I did here...
HistorySelect(TimeCurrent() - PeriodSeconds(PERIOD_D1), TimeCurrent() + 10);
Improperly formatted code edited by moderator. Please use the CODE button (Alt-S) when inserting code.
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please read the following ...
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Hi there,
Above code is from MQL5 help file - returns 38
Changed to:
Returns 37
But when manually counting all history in MT5 History Tab only 18 including first initial Deposit on Demo Account
What am I doing wrong?
How to return number of history which is the same as manually counting MT5 History Tab?
Please help - thank you