Thanks. So regarding the other thread where you posted code: As far as I understand, I would need to call iTime() which will then cause MT4 to load the history in its own time. Then I wait until the errors are gone and I'm good to use iBarShift(). Is this about the procedure?
I'm still confused. Will only iTime prompt the platform to download history or will iBarShift also do the trick? I'm having the same problem with another indicator of mine..
I believe only those that read bars

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 guys,
So i wanted to use iBarShift to find out in a higher timeframe, which bar covers a specific time. But it does return -1 sometimes (i put false as the exact parameter). My suspicion is that it does that because the bars are not yet initialized in the higher timeframe. Only when i enter that higher timeframe the bars catch up and i can apply iBarShift to that timeframe from a lower timeframe without error.
Can somebody confirm my observation?
And if so, how do i get around this? Can I prompt Metatrader to load the higher timeframe independently of which timeframes I jump through?
Thanks in advance!