Библиотеки: Calendar - страница 12

 
Как узнать время события за 1 час до его выхода?
 
Kekeletso Mofokeng #:
Как узнать время события за 1 час до его выхода?

Ваш вопрос нужно сформулировать иначе.

 
fxsaber #:

Your question needs to be formulated differently.

Hi Hello. Sorry about that but I tried a different method and it seems to be working but if there's another way of doing it please share

Calendar.GetPosAfter(TimeCurrent() + 1 * PeriodSeconds(PERIOD_H1));
 
Kekeletso Mofokeng #:

Hi Hello. Sorry about that but I tried a different method and it seems to be working but if there's another way of doing it please share

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

void OnStart()
{
  CALENDAR Calendar;
  
  // Взяли события по всем (NULL) валютам начиная с самой низкой (NONE) важности.
  const int Size = Calendar.Set(NULL, CALENDAR_IMPORTANCE_NONE, TimeTradeServer(), TimeTradeServer() + 3600);
  
  // Распечатали их.
  for (int i = 0; i < Size; i++)
    Print(Calendar[i].ToString());
}
 
fxsaber # :

Thanks