How to force MT4 to download lower timeframe data (eg. M1) when on a higher timeframe chart (eg. H1)
Unless the chart is that specific pair/TF,
you must handle 4066/4073 errors. See Download
history in MQL4 EA - MQL4 and MetaTrader 4 -
MQL4 programming forum
whroeder1:
Unless the chart is that specific pair/TF, you must handle 4066/4073 errors. See Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
Unless the chart is that specific pair/TF, you must handle 4066/4073 errors. See Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
The chart is always that specific pair, but it is not set to M1 TF when this issue happens.
Although switching to M1 TF fixes the problem, I'd like to figure out how I can force MT4 to download historic data at the lowest possible granularity (PERIOD_M1) while at a higher TF, say, H1 or H4.
imadmg: I'd like to figure out how I can force MT4 to download historic data at the lowest possible granularity (PERIOD_M1) while at a higher TF, say, H1 or H4.
| Which is exactly what I gave you. |

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
The iTime() function seems to be returning valid dates for some currency pairs (eg. "EURUSDpro", "GBPUSDpro") but not others (eg. "USDJPYpro").
I am using it as follows:
I've already checked that M1 data is available in the History Center, so that's not the cause.
When it works, it returns today's date at PERIOD_M1 granularity, but when it fails, it returns: 1970.01.01 00:00:00.
Is this a bug in the function?