- Connecting a Python script to the terminal and account
- Daylight saving time (local)
- Local and server time
Can MQL5 uniquely determine the UTC open time of historical CopyRates bars?
- 2026.10.09
- www.mql5.com
It was already discussed many times, for example:
Can MQL5 uniquely determine the UTC open time of historical CopyRates bars?
Thank you.
Forum on trading, automated trading systems and testing trading strategies
MetaTrader 5 build 6231: clock basis of historical Symbols → Ticks timestamps and exported CSV
Alain Verleyen, 2026.10.08 16:00
ALL data MT5 returns are ALWAYS broker server time data.Hello MetaQuotes technical team,
I am following up on the timestamp discrepancies reported in this thread. I am auditing read-only EURUSD H1 historical data from MetaQuotes-Demo and need clarification about the original timestamps before attempting any UTC conversion.
Could a MetaQuotes engineer or someone familiar with the historical configuration of MetaQuotes-Demo clarify the following?
1. MT5 API timestamp semantics
Do MQL5 MqlRates.time and Python rates time represent actual POSIX UTC bar-opening instants, or can they encode server-local clock labels as epoch-shaped integers?
Does this differ between MQL5 and Python or between current and historical bars?
Separately, what do tick time and time_msc represent? Are tick timestamps governed by the same clock rules as historical H1 bars?
Which clock domain is used for datetime bounds in Python copy_rates_range and copy_ticks_range, and are the endpoints inclusive?
2. MetaQuotes-Demo historical server configuration
For EURUSD between 12 October 2024 and 12 October 2026, could you confirm the server's historical UTC offsets and their exact effective intervals?
Were there daylight-saving changes, exceptions, server migrations, or retrospective history rebuilds?
How should the first H1 bars after market reopenings around 27 October 2024, 30 March 2025, 26 October 2025, and 29 March 2026 be interpreted?
3. Observed discrepancies
In a controlled October 2026 comparison, MQL5 CopyRates and Python copy_rates_from_pos returned identical raw time integers for 15 matched bars.
At 2026-10-21 23:36 UTC, the chart labelled its current H1 bar 2026-10-22 02:00, with raw integer 1792634400. A literal POSIX UTC interpretation would place the bar opening after the observation.
Independent BID H1 OHLC comparisons with Dukascopy UTC data were compatible, on observed bars only, with candidate shifts of UTC+3 before / UTC+2 after the October 2024 and 2025 transitions, and UTC+2 before / UTC+3 after the March 2025 and 2026 transitions.
These are observations and hypotheses, not confirmed MetaQuotes-Demo server rules.
4. Official UTC reconstruction
If historical bar timestamps encode server-local clock labels, is there an officially supported and unambiguous method to recover their original UTC instants, including DST transitions and market reopenings?
Could you provide a dated technical reference, historical server-configuration record, or authoritative contact who can confirm these rules for bars and ticks separately?
If the historical configuration cannot be verified, please state that limitation explicitly.
No account access or private credentials are required.
Thank you for your assistance.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use