Forum on trading, automated trading systems and testing trading strategies
Help with Time Zone Handling and Data Fetching in MT5
Stanislav Korotky, 2025.04.28 13:30
Yes, it looks like the documentation is incorrect, and the timestamps in the quotes are returned in the timezone of the server, the same way as on charts and in MT5 history.
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
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
"When creating the 'datetime' object, Python uses the local time zone,
On the Node.js side, I have an endpoint that returns the TradingView symbol configuration:
Except for the daily timeframes and upwards.
Everything works perfectly except daily and upwards.
Taking for granted that a "forex" symbol shouldn't be active during the weekend? Would make sense, but still, the root issue seems to be elsewhere to me, so I added these debug logs:
It’s driving me crazy and I don’t know where else to look 😭
I feel like I'm missing some actual knowledge about how meta trader 5 actually treats timezones, since online I've found conflicting opinions.
Plus what I'm trying to do seems quite "simple" to me, it's no rocket science. I want to query MT5 with a given range of dates and symbol,
get the data, store it in the db. So I can reuse it as cache for the next requests of same data. Ideally building an incremental cache db over time.
(I'm skipping all the nodejs data layer logics since are irrelevant for this issue)