MQL5 - History Deals not updating
You need to use the time of the trading server. And it’s better to take it with a margin:
if(HistorySelect(0,TimeCurrent()+60*60*24;))
In general, the last deal needs to be caught in OnTradeTransaction.
How to start with MQL5
- 2019.08.18
- www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
Thank you so much Vladimir!
I need a function to retrieve the latest trades closed. I'm calling this function from OnTrade(). I use to program in MQL4 and I'm new to MQL5. Thanks for the help!