Please share the code that specifically does this one task. Then we can see what you are doing.
Datetime is a class. so you can look at the format of the data and reproduce it exactly in a string. Then convert it to a datetime.
Hope this is helpful.
Chris
- www.mql5.com
Please share the code that specifically does this one task. Then we can see what you are doing.
Datetime is a class. so you can look at the format of the data and reproduce it exactly in a string. Then convert it to a datetime.
Hope this is helpful.
Chris
It seems to not be a problem from the code, even when I do it manually I get a shorter time interval than what I request. It is not due to the data not being available, I have checked and there is data from 2017 onward. Here is a screenshot of what I mean.
It se
It seems to not be a problem from the code, even when I do it manually I get a shorter time interval than what I request. It is not due to the data not being available, I have checked and there is data from 2017 onward. Here is a screenshot of what I mean.
How did you check that ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I have a script that downloads market data using the Bars() CopyRates() functions, the start and end time are converted from a string to datetime, so for example if I want to download market data from 2020 until 2023 I will write something like this: "2020.01.01 00:00" "2023.01.01 00:00" and convert it to a datetime using the MQL5 provided function. However, the data that gets downloaded has a wrong interval (from 2020.11.02 until 2023.03.01)
Any ideas why this may be happening? Thanks!