Libraries: Calendar - page 12

 
How do I know the time of an event 1 hour before it is released?
 
Kekeletso Mofokeng #:
How can I find out the time of an event 1 hour before it is released?

Your question should be phrased differently.

 
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;
  
  // Took events for all (NULL) currencies starting with the lowest (NONE) importance.
  const int Size = Calendar.Set(NULL, CALENDAR_IMPORTANCE_NONE, TimeTradeServer(), TimeTradeServer() + 3600);
  
  // Printed them out.
  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

This is a general question on tester_file for MQL5-market. Try to ask it in the corresponding discussion thread.

 

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


Congratulations on your fantastic news library for MQL5! I am wondering if you have considered adding event impact management. I believe it could further enhance its functionality.

 
if (MQLInfoInteger(MQL_TESTER)) // If working in Tester
{
      Res = Calendar.Load(CALENDAR_FILENAME);
      Print ("SIZE = ", Calendar.Set(NULL,CALENDAR_IMPORTANCE_NONE, 0, 0));
...


Why do I get 0 in the tester? Although if I use it on a chart, there are 50k events.


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

but it works like this, does it mean that the problem is in Set function?

(using build 4620)