Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please always use the CODE button (Alt-S) when inserting code.
extend your trade history by right-clicking in the "Account History" section and selecting "All History"
OrdersHistoryTotal
Returns the number of closed orders in the account history loaded into the terminal.
int OrdersHistoryTotal();
Returned value
The number of closed orders in the account history loaded into the terminal. The history list size depends on the current settings of the "Account history" tab of the terminal.
---------------------------------------------------
Just do what Fernando said.
OrdersHistoryTotal
Returns the number of closed orders in the account history loaded into the terminal.
Returned value
The number of closed orders in the account history loaded into the terminal. The history list size depends on the current settings of the "Account history" tab of the terminal.
---------------------------------------------------
Just do what Fernando said.
I know but this will be an EA, this needs to be done by EA, i can't access all the pcs in which the EA will be
No way to get programmatically history trades with specified time period.
This is possible in MT5, where you can define start and end date, but in MT4 you have only access to part of history showing in MT4 account history tab.
Myfxbook does this because you provide you with access as an investor and select to see the entire history. In other words, the only thing you can do is to warn users about this detail.
Do you understand now why MQL5 is so much better and MQL4 is obsolete? 😅
No way to get programmatically history trades with specified time period.
This is possible in MT5, where you can define start and end date, but in MT4 you have only access to part of history showing in MT4 account history tab.
Myfxbook does this because you provide you with access as an investor and select to see the entire history. In other words, the only thing you can do is to warn users about this detail.
Do you understand now why MQL5 is so much better and MQL4 is obsolete? 😅
Thank you so much, should i change the EA to MT5? lol

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
But for my case, history only retrieves last month history, not all
Is there a way to just return deposits or profits for the account?
Like how does myfxbook show all the statistics, I know they have all the orders history, but how do I get that?
Thanks in advance.