Why I can't get total order history data with code HistoryOrdersTotal() and HistoryDealsTotal() in mql5 ?
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
ATI Trading:
Why I can't get total order history data with code HistoryOrdersTotal() and HistoryDealsTotal() in mql5 ?
Why I can't get total order history data with code HistoryOrdersTotal() and HistoryDealsTotal() in mql5 ?
void OnTick() { int totalOrdersInHistory = HistoryOrdersTotal(); printf("history %d", totalOrdersInHistory); }That is the code I use
ATI Trading #:
That is the code I use
That is the code I use
Are you sure you are looking for orders? This code will return 0 unless you actually have orders in the system.
You say "history" so I suspect it may not be just orders but "deals" that you want too
Look at the help - in particular at this function
Documentation on MQL5: Trade Functions / HistorySelect
- www.mql5.com
HistorySelect - Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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