How to get a specific candle?

 
Is it possible to prorammatically get a candle (or; it's HLOC values) from a specific time? For example, I would like to have HLOC values from H1 map's candle for the time 7:00 - 8:00 or M5 map's candle 14:15 - 14:20. Is it possible?
 

Yes, it is possible. One way:

Convert time to bar shift ... see StrToTime() and iBarShift()

and use that in iOpen() iHigh() iLow() iClose()

Reason: