Economic calendar. Questions, discussions. - page 8

 
Rashid Umarov:

Thank you, we've found out the reason - different timezones. We will let you know when a solution is found.

You mean country timezones?

 
Alexey Viktorov:

You mean country timezones?

User (terminal) and event source timezone

 
Rashid Umarov:

Time zone of user (terminal) and event source

But in querying CalendarValueHistory, it's GMT time, not terminal time, and GMT time is written to the structure. And the fact that one news is visible and the other is not with all the same parameters.

Of course I'm not going to argue with programmers who are more literate than me, but there's no logic here. After all, if the time of news is specified 1:30 and the request is made from 1:00 to 2:00, then this news should be visible regardless of time MT. And when the request is made from 1:00 to 4:00, suddenly this news is found and the time of news is defined as 1:30. All the same, other dates specified in my example work without problems with a time range of 1 hour.

And since I work with economic calendar, I would like to ask for opportunity to set time range, even 5 minutes, if I can't ask for news in 1:30 to 1:31 range. But I must admit, I didn't check minimal acceptable range.

 
News release time may change by an hour
 
Vladimir Kononenko:
The time of the news may change by an hour

So? At what time can the change occur? Immediately at the appointed time instead of the news time change?

 
Alexey Viktorov:
But in the CalendarValueHistory query, the time is GMT, not the terminal time, and the GMT time is written to the structure.

Adding a note to the calendar functions

Note

All functions for the Economic Calendar use the time of the Trade Server (TimeTradeServer). This means that the time in the MqlCalendarValue structure and incoming time parameters in the CalendarValueHistoryByEvent/CalendarValueHistory functions are set in the timezone of the trade server, not in the local user time.

 
Rashid Umarov:

Adding a note to the calendar functions

Note

All functions for the Economic Calendar use the time of the Trade Server (TimeTradeServer). This means that the time in the MqlCalendarValue structure and the incoming time parameters in the CalendarValueHistoryByEvent/CalendarValueHistory functions are set in the timezone of the trade server, not in the local user time.

Thank you, I checked on one problem area. Everything is as the doctor prescribed.

   datetime date_from = D'15.8.2019 4:30:00';
   datetime date_to = date_from+PeriodSeconds(PERIOD_M1);
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    Получены значения событий по country_code=AU: 4
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    date_from 2019.08.15 04:30:00 : date_to 2019.08.15 04:31:00
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)         [id] [event_id]              [time]            [period] [revision] [actual_value] [prev_value] [revised_prev_value]     [forecast_value] [impact_type] [reserved]
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    [0] 93908   36010004 2019.08.15 04:30:00 2019.07.01 00:00:00          0       34500000     21100000             21000000 -9223372036854775808             0          0
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    [1] 93909   36010005 2019.08.15 04:30:00 2019.07.01 00:00:00          0       66100000     66000000 -9223372036854775808             66100000             0          0
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    [2] 93910   36010003 2019.08.15 04:30:00 2019.07.01 00:00:00          0       41100000       500000             -2300000             26800000             1          0
2019.08.30 16:54:21.134 Test bag (AUDUSD,H1)    [3] 93911   36010006 2019.08.15 04:30:00 2019.07.01 00:00:00          0        5200000      5200000 -9223372036854775808              5100000             2          0

If you know the exact time of the news, you can specify a request range of 1 minute. But we must take into account that date_to is not included in the range. That is, if you set the time

   datetime date_from = D'15.8.2019 4:29:00';
   datetime date_to = date_from+PeriodSeconds(PERIOD_M1);

The economic calendar events from the example above will not be received.

 
Tried it in the tester - the calendar events are not uploaded. I wonder when the calendar will be implemented in the strategy tester?
Vladimir Kononenko:
Renat Fatkhullin:

We have already made our own licensed clean implementation ofthe economic calendar.

Our service independently collects raw data from numerous official sources and is set up to react as quickly as possible. In addition, an in-depth history of the values is maintained.

First, we will enable the calendar on this website, and then we will upgrade the calendar in MT5 and give direct access to all the calendar data from MQL5. You will be able to use the calendar in the tester - its history will also be simulated.

__________________

It seems to be not yet implemented in the Strategy Tester

Reason: