- How can I read the history file using kernell32 library in mql4 and mql5?
- How to make an EA in mq5 to trade only one hour before high impact news, and one hour after?
- Code to know when a position reached takeprofit in mq5?
It is right there in the documentation, with example code, and it is just one function ... CopyRates()
Plus you have already asked this before and I answered you with the same information, so follow the links provided and read the documentation that includes example of the code.
Forum on trading, automated trading systems and testing trading strategies
How can I read the history file using kernell32 library in mql4 and mql5?
Fernando Carreiro, 2018.10.06 12:29
As I have stated, in MetaTrader v5, you can't read the History file directly because it is encrypted, but you can just read the data directly by using the CopyRates() function. You can even read tick data directly as well with the CopyTicksRange() function.
Even on MetaTrader v4, there is no need to read the history directly, unless you are trying to circumvent the Strategy Tester to look ahead and thus produce false trading results, which is unethical.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use