CalendarValueHistoryByEvent Cannot get data

 

Hi, I want to Read History calendar but it cannot be loaded from 2017 to 2022 there is no data in this period I have tested it on several brokers same result. 

event_id=840030016 is for Nonfarm payrolls 

   datetime date_from = D'2017.01.17';
   datetime date_to = D'2022.01.01';
   ulong event_id = 840030016;
   MqlCalendarValue values[];
   datetime ct = iTime(_Symbol, PERIOD_CURRENT, 0);
   ResetLastError();
   if(CalendarValueHistoryByEvent(event_id, values, date_from, date_to))
     {
      PrintFormat("Received values for : %d",
                  ArraySize(values));
     }
   else
     {
      PrintFormat("Error! Failed to get values for event_id=%d",event_id);
      PrintFormat("Error code: %d",GetLastError());
      return;
     } 

returned error code is 0

Nonfarm Payrolls - economic indicator from the United States
Nonfarm Payrolls - economic indicator from the United States
  • www.mql5.com
Nonfarm Payrolls present the number of new jobs created during the given month, in all non-agricultural sectors of the U.S. The indicator growth can have a positive effect on dollar quotes
 
Gholamhossein Eslamizadeh:

event_id=840030016 is for Nonfarm payrolls 

returned error code is 0

void OnStart()
{
  datetime date_from = D'2017.01.17';
  datetime date_to = D'2022.01.01';
  ulong event_id = 840030016 ;        
     MqlCalendarValue values[];
     datetime ct = iTime(_Symbol, PERIOD_CURRENT, 0);
     ResetLastError();
     if(CalendarValueHistoryByEvent(event_id, values, date_from, date_to))
       {
        PrintFormat("Received values for %d", ArraySize(values)); 
       }
     else
       {
        PrintFormat("Error! Failed to get values for event_id=%d",event_id);
        PrintFormat("Error code: %d",GetLastError());
        return;
       }
}


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

void OnStart()
{
  CALENDAR Calendar;

  Calendar.Set("USD", CALENDAR_IMPORTANCE_HIGH, D'2017.01.17', D'2022.01.01');
  const int Size = Calendar.FilterByName("payrolls");
  
  for (int i = 0; i < Size; i++)
    Print(Calendar[i].ToString());
}


2017.02.03 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 227 K |  | 156 K | 157 K
2017.03.10 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 235 K |  | 227 K | 238 K
2017.04.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 98 K |  | 235 K | 219 K
2017.05.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 211 K | 171 K | 98 K | 79 K
2017.06.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 138 K | 174 K | 211 K | 174 K
2017.07.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 222 K | 172 K | 138 K | 152 K
2017.08.04 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 209 K | 176 K | 222 K | 231 K
2017.09.01 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 156 K | 177 K | 209 K | 189 K
2017.10.06 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | -33 K | 172 K | 156 K | 169 K
2017.11.03 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 261 K | 159 K | -33 K | 18 K
2017.12.08 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 228 K | 159 K | 261 K | 244 K
2018.01.05 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 148 K | 159 K | 228 K | 252 K
2018.02.02 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 200 K | 157 K | 148 K | 160 K
2018.03.09 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 313 K | 159 K | 200 K | 239 K
2018.04.06 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 103 K | 166 K | 313 K | 326 K
2018.05.04 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 164 K | 168 K | 103 K | 135 K
2018.06.01 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 223 K | 166 K | 164 K | 159 K
2018.07.06 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 213 K | 158 K | 223 K | 244 K
2018.08.03 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 157 K | 160 K | 213 K | 248 K
2018.09.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 201 K | 161 K | 157 K | 147 K
2018.10.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 134 K | 160 K | 201 K | 270 K
2018.11.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 250 K | 167 K | 134 K | 118 K
2018.12.07 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 155 K | 169 K | 250 K | 237 K
2019.01.04 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 312 K | 170 K | 155 K | 176 K
2019.02.01 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 304 K | 168 K | 312 K | 222 K
2019.03.08 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 20 K | 173 K | 304 K | 311 K
2019.04.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 196 K | 176 K | 20 K | 33 K
2019.05.03 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 263 K | 167 K | 196 K | 189 K
2019.06.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 75 K | 170 K | 263 K | 224 K
2019.07.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 224 K | 176 K | 75 K | 72 K
2019.08.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 164 K | 178 K | 224 K | 193 K
2019.09.06 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 130 K | 177 K | 164 K | 159 K
2019.10.04 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 136 K | 174 K | 130 K | 168 K
2019.11.01 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 128 K | 172 K | 136 K | 180 K
2019.12.06 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 266 K | 168 K | 128 K | 156 K
2020.01.10 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 145 K | 168 K | 266 K | 256 K
2020.02.07 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 225 K | 161 K | 145 K | 147 K
2020.03.06 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 273 K | 161 K | 225 K | 273 K
2020.04.03 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | -701 K | 163 K | 273 K | 275 K
2020.05.08 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | -20500 K | 139 K | -701 K | -870 K
2020.06.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 2509 K | -10000 K | -20500 K | -20687 K
2020.07.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 4800 K | -12034 K | 2509 K | 2699 K
2020.08.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 1763 K | 4511 K | 4800 K | 4791 K
2020.09.04 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 1371 K | -74433 K | 1763 K | 1734 K
2020.10.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 661 K | 78356 K | 1371 K | 1489 K
2020.11.06 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 638 K | -76324 K | 661 K | 672 K
2020.12.04 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 245 K | 528 K | 638 K | 610 K
2021.01.08 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | -140 K | 207 K | 245 K | 336 K
2021.02.05 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 49 K | -497 K | -140 K | -227 K
2021.03.05 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 379 K | -137 K | 49 K | 166 K
2021.04.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 916 K | 409 K | 379 K | 468 K
2021.05.07 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 266 K | -1 K | 916 K | 770 K
2021.06.04 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 559 K | -396 K | 266 K | 278 K
2021.07.02 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 850 K | 3 K | 559 K | 583 K
2021.08.06 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 943 K | 381 K | 850 K | 938 K
2021.09.03 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 235 K | 23 K | 943 K | 1053 K
2021.10.08 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 194 K | -302 K | 235 K | 366 K
2021.11.05 15:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 531 K | -54 K | 194 K | 312 K
2021.12.03 16:30 USD 3 Nonfarm Payrolls(nonfarm-payrolls), United States(US) | 210 K | 330 K | 531 K | 546 K
 
fxsaber #:


Thank you a lot for your respond. 

Now I am sure there is something wrong here ! yesterday I got 0 events and today I just get 34 events and as you said you have got 59 Events. It is definitely not normal!

I am totally confused now.

can you kindly check it another time to confirm this strange behavior?

any ideas why some events are missing? and received events for history changed when we check it different days?  it is history

 
Gholamhossein Eslamizadeh #:

can you kindly check it another time to confirm this strange behavior?

any ideas why some events are missing? and received events for history changed when we check it different days?  it is history

Unfortunately, that's all I could help.