Delacrua:
When i use datetime with UTC timezone to get myself todays 00:00:00 dateime and then call i get results which seem understandable at first:
The timestamp 1701043200.0 converts to datetime UTC as I expected it to be - 2023-11-27 00:00:00+00:00
Hi everyone, just started working with MQL5 Python integration and found a question that I just can't get right
When i use datetime with UTC timezone to get myself todays 00:00:00 dateime and then call i get results which seem understandable at first:
The timestamp 1701043200.0 converts to datetime UTC as I expected it to be - 2023-11-27 00:00:00+00:00
The problem starts at the end of the sequence of data The timestamp 1701079200.0 converts to datetime UTC as I originally expected - 2023-11-27 10:00:00+00:00 corresponding with the limit (time_now) I used in my request but than i noticed that Close of the latest data record is not changing, and I expected it to change at subsequent requests (as the latest candle should still be moving). after adding a few hours to the copy_rates_range request I found that there are two more timestamps with data: gave me the following picture: Ad now the latest record changes it's Close value on subsequent requests meaning that it is indeed the latest candle of the data but the problem i face is that the timestamp of that data is converted to datetime UTC as 2023-11-27 12:00:00+00:00 Which seems impossible to me as it is 10:35 UTC now, at the moment i'm making the request Please help me understand what i'm getting wrong or where is my mistake
I use Python for other non MT5 projects, but out of curiosity I took a look at this - unfortunately I could not get your code to compile (I use Eclipse and PyDev)
Can you paste a complete compilable unit please?
R4tna C #:
I use Python for other non MT5 projects, but out of curiosity I took a look at this - unfortunately I could not get your code to compile (I use Eclipse and PyDev)
Can you paste a complete compilable unit please?
Added a .py with code
the main problem is that time now shows me 6:33 UTC while the data of latest obtained Symbol candle shows 8:00 UTC (at the moment ofc)
Files:
py_date_mql5.py
1 kb
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
Hi everyone, just started working with MQL5 Python integration and found a question that I just can't get right
When i use datetime with UTC timezone to get myself todays 00:00:00 dateime and then call i get results which seem understandable at first:
The timestamp 1701043200.0 converts to datetime UTC as I expected it to be - 2023-11-27 00:00:00+00:00