Question to the iBarShift-Function

 

Hello,


I want to get the Number of bars from the actual time to 6 o'clock from the actual day.

I thought I can use the iBarShift-Function, but what do I have to write for the "time-Parameter"??

iBarShift(NULL,0,6)


Lot's of thanks, sunshineh

 

u have to use for loop or while to find the 6 o'clock bar

 

Similar problem answered https://www.mql5.com/en/forum/131991

 

I don't think that you need a for/while loop, but then again I don't actually understand what it is that you're trying to achieve

6 o'clock - AM or PM?

6 o'clock - user wall clock time, broker wall clock time, or some other time?

6 o'clock - before or after a bar?

actual day - user wall clock day, broker wall clock day, bar day, or some other day

 

Yeah you don't need for/while because ibarshift does the searching for you...but you do need to know the open time of the bar you are searching for and that time needs to be in standard time format: "time, in seconds, that has passed since 00:00 a.m. of 1 January, 1970"