Download MetaTrader 5

iBarShift issue

To add comments, please log in or register
Bogdan Caramalac
1112
Bogdan Caramalac  

Build 216.

Is it normal that an exact iBarShift to return a bar number even if it's not there?

I am looking for a specific date, something @14:45 for instance, on the H1, with exact=true, and it returns a bar number on H1, though all hourly bars begin @:00 . Is that normal or is a bug?

I had to redo my version of iBarShift, and it's much slower...

Bogdan Caramalac
1112
Bogdan Caramalac  
Found solution...check with iTime if found bar matches; but not sure if this was iBarShift intended behavior...
Alain Verleyen
Moderator
31183
Alain Verleyen  
TheEconomist:

Build 216.

Is it normal that an exact iBarShift to return a bar number even if it's not there?

I am looking for a specific date, something @14:45 for instance, on the H1, with exact=true, and it returns a bar number on H1, though all hourly bars begin @:00 . Is that normal or is a bug?

I had to redo my version of iBarShift, and it's much slower...

It's normal. iBarShift return the bar number which contains the specified time, if any.
whroeder1
14779
whroeder1  
[14:00 - 14:59] contains 14:45, so it is correct. See also https://www.mql5.com/en/forum/145041
To add comments, please log in or register