Need help for calendar eco and variable

 
Hello,



I can't do what I want to do, despite several hours of research.

I would like to get the time of the next economic announcement of the day which has a high importance (I already found the formula: ENUM_CALENDAR_EVENT_IMPORTANCE, but I don't know how to use it) to store it in a variable and when the time of this announcement is over, it goes to the next announcement

I don't know if my explanations are very clear, if needed I can explain more in detail.



Thank you in advance for your help!

 
#include <fxsaber\Calendar\Calendar.mqh> // https://www.mql5.com/ru/code/32430

input int inAmountNews = 5;

void OnTick()
{
  CALENDAR Calendar;
  
  Calendar.Set();
  
  Comment(Calendar.ToString(0, inAmountNews));
}


 
Thank you very much for your precious help!
 
fxsaber #:


Hi, I have a question, I don't know if it's possible. I've been trying to figure out how to do this all afternoon, but I'm struggling, I'm a beginner in mql5.


I just want to display the date and time of the announcement, like on the screen, is it possible?

Files:
fzfezf.jpg  15 kb
 
GREED #:

I just want to display the date and time of the announcement, like on the screen, is it possible?

#include <fxsaber\Calendar\Calendar.mqh> // https://www.mql5.com/ru/code/32430

void OnTick()
{
  CALENDAR Calendar;
  
  Calendar.Set();
  
  Comment(Calendar[0].time);
}
 
fxsaber #:

Thank you very much! And especially thank you for responding so quickly!