Detecting Broker Time Zones and DST from NFP Volatility in MQL5
Summary
The article explains why an automated strategy needs to distinguish broker server time from UTC and account for daylight saving time when it trades around market sessions. A one-hour server-clock shift can change which broker-time hour corresponds to a session open, so inaccurate conversion can cause an EA to miss intended trading windows. The article frames this as groundwork for matching strategies to historically favorable times.
Its proposed detector retrieves annual Non-Farm Payroll release dates from the MQL5 economic calendar, then checks EURUSD M15 candles for unusually large ranges relative to candles an hour before and after. A change in the timing of these volatility fingerprints is used to estimate a broker clock shift and compare it with EU, US, and Australian DST calendars. The script also locates broker-specific EURUSD symbol names and reports the current offset and inferred rule. The method depends on NFP spikes appearing clearly in historical data; irregular release schedules can undermine a year’s inference, so the author recommends analyzing another year when patterns mismatch. Calendar retrieval is unavailable in the Strategy Tester.
Key ideas
- Broker server time can shift relative to UTC when a broker observes daylight saving time, affecting session-based entry windows.
- The proposed detector uses scheduled NFP releases as time markers and checks EURUSD M15 candle ranges for volatility spikes.
- A change in the timing of those spikes can indicate a broker clock transition and help identify a regional DST schedule.
- The approach can fail when release dates or volatility patterns are irregular, and calendar data is unavailable in the Strategy Tester.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.