Subject: MetaTrader 5 Python API — Bar timestamps and historical session gaps on MetaQuotes-Demo

Hello,

I am developing a Python-based trading system using MetaTrader 5 build 6292 and the official Python integration package 5.0.6231, connected to MetaQuotes-Demo.

Two independently installed MT5 terminals return matching historical OHLC data, but I need clarification on two issues:

  1. The exact UTC meaning of the time field returned by Python's copy_rates_* functions, its relationship to server chart time, and how to verify that an H1 candle has fully closed and become available.

  2. Historical D1/H4 candles are absent around December 25 and January 1 for some Forex symbols. How can I verify whether these are official server trading-session closures rather than missing history?

I also observed unexpected out-of-range historical responses during a far-future diagnostic request.

Could a MetaQuotes technical specialist clarify the documented timestamp behavior and recommend a reliable way to verify closed candles and historical trading-session gaps?

I can provide sanitized UTC timestamps, request parameters and reproducible diagnostics.

Thank you.

Mak71on:
Could a MetaQuotes technical specialist

I am not MetaQuotes technical specialist but there are some questions which were asked many times on this forum (and it was answered many times as well) so I hope it may help with your research, for example: