Economic calendar. Questions, discussions. - page 7

 
Alexey Viktorov:

Artyom, don't make me laugh. You read and see how many pages a day this thread is filled with errors and "problems". It seems that people are not writing for trading, but for comparison between C++ and MQL5. It would be easier to provide the developers with the whole code instead of a scrap of it.

I'm aware that there are people who forget that this is MQL, not C++. And I suggested to create a "MQL5 vs C++" thread to compare and find discrepancies.

But if you don't post anything at all there because of experiments voiced by some people, the thread will become not "Bugs, bugs, questions" but "Find a difference from C++ and complain about a bug"...

 

Well, I thought writing minimal code would reveal my mistake... But it didn't. Apparently there really is a problem with the calendar.


//+------------------------------------------------------------------+
//|                                                     Test bag.mq5 |
//|                                          © 2019, Alexey Viktorov |
//|                     https://www.mql5.com/ru/users/alexeyvik/news |
//+------------------------------------------------------------------+
#property copyright "© 2019, Alexey Viktorov"
#property link      "https://www.mql5.com/ru/users/alexeyvik/news"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   MqlCalendarValue   values[];
   string             countryCode = "AU";//NULL;//          //  Даже если делать запрос с параметром NULL результат для D'15.8.2019 1:00:00' неизменен
//---
   datetime date_from = D'15.8.2019 1:00:00';               //  С этими значениями диапазона времени события не получены
   datetime date_to = date_from+PeriodSeconds(PERIOD_H1)*2; //  Если увеличить время заменой 2 на 3 или больше, события получены.
//---
   //datetime date_from = D'6.8.2019 4:00';                   //  С любой из следующих дат события календаря получены без проблем.
   //datetime date_from = D'08.08.2019 23:00';                //  Достаточно закомментировать строки 18 и 19 и раскомментировать одну из этих дат
   //datetime date_to = date_from+PeriodSeconds(PERIOD_H1);   //  и раскомментировать эту строку.
   if(CalendarValueHistory(values, date_from, date_to, countryCode))
    {
     PrintFormat("Получены значения событий по country_code=%s: %d", countryCode, ArraySize(values));
     Print("date_from ", date_from," : date_to ", date_to);
     ArrayPrint(values);
    }
  else
    {
     PrintFormat("Ошибка! Не удалось получить события по стране country_code=%s", countryCode);
     Print("date_from ", date_from," : date_to ", date_to);
     PrintFormat("Код ошибки: %d",GetLastError());
    }
   
  }
//+------------------------------------------------------------------+
Files:
Test_bag.mq5  5 kb
 
Dear developers, where does the calendar get its forecast values from?
 
Vladimir Kononenko:
Dear developers, where does the calendar take the forecast values from?

Forum on trading, automated trading systems and trading strategy testing

Economic Calendar: Already on MQL5.com, Coming Soon to MetaTrader 5

Renat Fatkhullin, 2017.05.23 19:09

Very busy.

The calendar is in development - we will add a lot of events. We are writing our own engine and collecting data from primary sources, not using someone else's calendar.

As soon as we do the integration with the MT5 terminal, we will move on to the integration with MQL5.

 
Alexey Viktorov:

Apparently, by "data" Renat meant actual values. Where does the calendar get its forecast values before the news is published?
 
Vladimir Kononenko:
Apparently, by "data" Renat meant actual values. Where in the calendar do the forecast values come from before the news release?

A programmer, especially a programmer of Renat's calibre, cannot be ambiguous. If it is data, it means all the data. If it were only current, it would be the same. IMHO.

 
<br / translate="no">.
Forecast values, unlike actual values, can only have one source. I couldn't find a reference to it in the calendar.
Also, in different calendars, I often find discrepancies in the forecast values.

 

Forum on trading, automated trading systems and trading strategy testing

Economic calendar. Questions, discussions.

Vladimir Kononenko, 2019.08.19 17:49

There may be only one source of forecast values, as opposed to the actual ones. I could not find a reference to it in the calendar.
I've always considered that there is a discrepancy between forecast values in different calendars.


It means that only one source publishes forecast values, but the actual values are published by anyone?

 
Vladimir Kononenko:
Forecast values, unlike actual values, can only have one source. I couldn't find a reference to it in the calendar.
Also, in different calendars, there is often a discrepancy in the forecast values.

possibly reuters
 
Alexey Viktorov:

Well, I thought writing minimal code would reveal my mistake... But it didn't. Apparently there really is a problem with the calendar.

Thank you, the reason was found - different timezones. We will let you know when a solution is found.

Reason: