Determine BAR from known DATETIME?

 
Hello all,

I use several time periods... how can I determine the specific bar index for a specific time?

For instance, 2 June 0:00 may be Bar[1] of D1 chart... how do I find the same bar time for the M5 chart?

Thanks for the help!

-charliev
 
Hello all,

I use several time periods... how can I determine the specific bar index for a specific time?

For instance, 2 June 0:00 may be Bar[1] of D1 chart... how do I find the same bar time for the M5 chart?

Thanks for the help!

-charliev


Use iBarShift()
 
Thank you.
-charliev
Reason: