Hello and greetings to you all potential helpers.
The error message log attached indicates 5402, which according to CalendarEventById - Economic Calendar - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5, signifies: ERR_CALENDAR_NO_DATA (country is not found).
The error emanated from a processing sequence of the MqlCalendar functions:
1.) CalendarValueHistory() to retrieve all events for a chosen currency, within a specified time range, and write them to an array -values[] - of MqlCalendarValue structures.
2.) CalendarEventById() uses the retrieved values.id from each values[] array entry to get the calendar event importance (or priority) and other parameters of interest.
The ultimate goal of the code is to filter each event according to the "parameters of interest"; however, the second function is unable to retrieve the attributes.
Please see the attached files for better clarification. Your aid is heartily appreciated, thank you.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello and greetings to you all potential helpers.
The error message log attached indicates 5402, which according to CalendarEventById - Economic Calendar - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5, signifies: ERR_CALENDAR_NO_DATA (country is not found).
The error emanated from a processing sequence of the MqlCalendar functions:
1.) CalendarValueHistory() to retrieve all events for a chosen currency, within a specified time range, and write them to an array -values[] - of MqlCalendarValue structures.
2.) CalendarEventById() uses the retrieved values.id from each values[] array entry to get the calendar event importance (or priority) and other parameters of interest.
The ultimate goal of the code is to filter each event according to the "parameters of interest"; however, the second function is unable to retrieve the attributes.
Please see the attached files for better clarification. Your aid is heartily appreciated, thank you.