Correction: Even in the first image for 7th March 2024, the event times are all wrong since (and so was i in stating that `Challenger Job cuts` event occurred at NewYork 8:30AM since it is actually at New York 7:30 AM) . Below is a screenshot of the News on that day from forexfactory (https://www.forexfactory.com/calendar?day=mar7.2024) with the NewYork time zone set.
Forex Calendar | Forex Factory
- www.forexfactory.com
Anticipate market-moving events long before they happen with the internet's most forex-focused economic calendar.
I solved this problem.
#include <fxsaber\Calendar\Calendar.mqh> // https://www.mql5.com/ru/code/32430 void OnStart() { CALENDAR Calendar; if (Calendar.Set("USD", CALENDAR_IMPORTANCE_NONE, D'2024.03.12', D'2024.03.13')) { Calendar.AutoDST(); Print(Calendar.ToString()); } }
fxsaber #:
I solved this problem.
I solved this problem.
I eventually grasped that when the documentation mentions that `All functions for interacting with the economic calendar utilize the trade server time (TimeTradeServer)`, it signifies synchronization with the broker's GMT offset settings. Hence, when examining datetimes that don't match the broker's current GMT offset, adjustments are necessary. Thanks for your help.
Documentation on MQL5: Economic Calendar
- www.mql5.com
This section describes the functions for working with the economic calendar available directly in the MetaTrader platform. The economic calendar is...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The examples below are on MT5 Version 5.0 Build 4274 and an MT5 Demo Account, GMT+3.
Clock changes to keep in mind:
- MT5 accounts changed the GMT offset on 31st March 2024 and looking back it seems to align with clock changes in London for DST.
- As for this year, NewYork DST was on 10 Mar 2024 .
Below is a screenshot of a GBPJPY chart on 7th March 2024 with the start of the green rectangle marking the start of NewYork session which usually also marks the release of some key events. In the example, the returned date of the events `Challenger Job cuts` which occur at NewYork 8:30AM are marked appropriately i.e. at the expected time.
Now when we go to 12th March 2024 (after NewYork DST changes on 10th march), the datetime returned as the event time doesnt seem to take this into account as shown below.
When we move over to 3rd April ( After London and MT5 Demo Account adjust their clocks), the event time returned is as expected. This for me suggests that there is an error in the way the event time ( server time )is calculated . or maybe I'm just wrong.