Get the array of event values by its ID since the Calendar database status with a specified change_id.
[in] Event ID.
[in][out] Change ID.
[out] MqlCalendarValue type array for receiving event values.
Number of received event values. To get information about an error, call the GetLastError() function. Possible errors:
All functions for working with the economic calendar use the trade server time (TimeTradeServer). This means that the time in the MqlCalendarValue structure and the time inputs in the CalendarValueHistoryByEvent/CalendarValueHistory functions are set in a trade server timezone, rather than a user's local time.
If the events array of fixed length was passed to the function and there was not enough space to save the entire result, the ERR_CALENDAR_MORE_DATA (5400) error is activated.
If change_id = 0 is passed to the function, the function always returns zero but the current calendar database is returned to change_id.
The function returns the array for a specified news and a new change_id that can be used for subsequent calls of the function to receive the new values of the news. Thus, it is possible to update values for a specified news by calling this function with the last known change_id.
If an event value does not have any of the fields specified below
then the value of the missing field is returned as INT64_MIN (-9223372036854775808).
The sample EA listening for the Nonfarm payrolls report release: