MQL5 Economic calendar: CalendarValueHistory and CALENDAR_EVENT_IMPORTANCE

 

I use CalendarValueHistory to get historical calendar data.

datetime date_from = D'24.10.2022';  
datetime date_to = D'25.10.2022';    
if (CalendarValueHistory(values, date_from, date_to, CountryCode))
{
//..

 But the most important parameter for me is the Event IMPORTANCE:

But exactly this value is NOT in the MqlCalendarValue structure. (Values are set in the listing ENUM_CALENDAR_EVENT_IMPORTANCE)

Is it somehow possible to get it or to calculate it from the values of the MqlCalendarValue structure?

Many Thanks



Economic Calendar – forex calendar with real-time forex news and reports, schedule of forthcoming world economy events
Economic Calendar – forex calendar with real-time forex news and reports, schedule of forthcoming world economy events
  • www.mql5.com
Economic Calendar – forex calendar with real-time forex news and reports, schedule of forthcoming world economy events. Economic calendar includes most important economic indicators and events from ministries and agencies of different countries. The Calendar is useful for traders in the forex market, stock exchanges and other financial markets.
Files:
 
A5005:

I use CalendarValueHistory to get historical calendar data.

 But the most important parameter for me is the Event IMPORTANCE:

But exactly this value is NOT in the MqlCalendarValue structure. (Values are set in the listing ENUM_CALENDAR_EVENT_IMPORTANCE)

Is it somehow possible to get it or to calculate it from the values of the MqlCalendarValue structure?

Many Thanks




I just found an example code that solves my problem. CalendarValueHistoryByEvent is my friend.

https://www.mql5.com/en/docs/calendar/calendarvaluehistorybyevent
https://www.mql5.com/en/articles/9874

MQL5 Cookbook – Economic Calendar
MQL5 Cookbook – Economic Calendar
  • www.mql5.com
The article highlights the programming features of the Economic Calendar and considers creating a class for a simplified access to the calendar properties and receiving event values. Developing an indicator using CFTC non-commercial net positions serves as a practical example.