Search code examples
mqlmql5

New MQL5 calendar functions - no values?


I can't seem to get any economic event values with MQL5's new calendar functions (see https://www.metatrader5.com/en/releasenotes).

Specifically...

MqlCalendarValue value[9999999];

ulong changeID=33212160;


int OnInit()

  {

   CalendarValueLastByEvent(840040003,changeID,value);

   ArrayPrint(value);

   return(INIT_SUCCEEDED);

  }

...does work but it only returns 0-values for datetime 1970 01 01.

Any solutions?

Thanks!


Solution

  • The error was on MetaQuotes' side and they fixed it with a new MetaTrader build realease. My above code now works. Thanks, MetaQuotes!