I haven't worked on calendar API yet but according to book "MQL5 Programming for Traders":
"Calendar functions cannot be used in the tester: when trying to call any of them, we get the FUNCTION_NOT_ALLOWED (4014) error. In this regard, testing calendar-based strategies involves first saving calendar entries in external storages (for example, in files) when running the MQL program on the online chart, and then loading and reading them from the MQL program running in the tester."
You can find the book here https://www.mql5.com/files/book/mql5book.pdf
"Calendar functions cannot be used in the tester: when trying to call any of them, we get the FUNCTION_NOT_ALLOWED (4014) error. In this regard, testing calendar-based strategies involves first saving calendar entries in external storages (for example, in files) when running the MQL program on the online chart, and then loading and reading them from the MQL program running in the tester."
You can find the book here https://www.mql5.com/files/book/mql5book.pdf
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
Sir/ Madam ,
I tried it but it doesn't work news calendar in MT5 strategy tester.
What should I do ?