Библиотеки: 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

 
Thank you
 

Hey, 

Thanks for this great library, super helpful, and very well coded.

I have a question: what is the workaround to get the EA to pass MQL5 market verification? They run the test in a back tester that can't access the calendar and, therefore, can't download the file.

I am using the example shared in the library, but I am not able to pass EA verification with the following error: 

test on EURUSD,H1 (netting) tester_file 'Calendar.bin' is not exist tester_file 'Calendar.bin' is not exist strategy tester report 6 total trades

Thanks in advance.

Gege

 
Grap the Trade #:

I have a question: what is the workaround to get the EA to pass MQL5 market verification? They run the test in a back tester that can't access the calendar and, therefore, can't download the file.

I am using the example shared in the library, but I am not able to pass EA verification with the following error: 

test on EURUSD,H1 (netting) tester_file 'Calendar.bin' is not exist tester_file 'Calendar.bin' is not exist strategy tester report 6 total trades

Это общий вопрос по tester_file для MQL5-market. Попробуйте его задать в соответствующей ветке обсуждения.

 

Congratulazioni per la tua fantastica libreria di notizie MQL5! Mi chiedo se hai mai considerato l'aggiunta della gestione dell'impatto degli eventi. Credo che potrebbe migliorare ulteriormente la sua funzionalità.


Поздравляю с вашей фантастической новостной библиотекой для MQL5! Мне интересно, рассматривали ли вы возможность добавления управления воздействием событий. Я верю, что это может еще больше повысить её функциональность.

 
if (MQLInfoInteger(MQL_TESTER)) // Если работаем в Тестере
{
      Res = Calendar.Load(CALENDAR_FILENAME);
      Print ("SIZE = ", Calendar.Set(NULL,CALENDAR_IMPORTANCE_NONE, 0, 0));
...


Почему в тестере у меня выдаёт 0? Хотя если использую на графике просто, то там 50к событий


      Calendar.GetEvents(events);      
      Print ("SIZE = ", ArraySize(events));

зато так работает, значит ли что проблема в Set функции?

(использую build 4620)