Getting the prices at specific time

 
Currently, I have an Custom Indicator that compares prices of 3 (or more) pairs at specific time, ie:
compare GBPUSD, EURGBP and EURUSD at Feb 20, 10:00AM,
compare GBPUSD, EURGBP and EURUSD at Feb 20, 10:05AM,
compare GBPUSD, EURGBP and EURUSD at Feb 20, 10:10AM,
compare GBPUSD, EURGBP and EURUSD at Feb 20, 10:15AM,
.
.
.
compare GBPUSD, EURGBP and EURUSD at Feb 23, 10:00AM,


I am currently using iClose[i] to check for the prices.
for(int i=0; i<limit; i++) {
if (lot1 > 0) aVar = iClose(Symbol1,0,i);
else aVar = 1/iClose(Symbol1,0,i);
if (lot2 > 0) bVar = iClose(Symbol2,0,i);
else bVar = 1/iClose(Symbol2,0,i);



However, I realized that some currency pairs do not have iClose[i] for specific time; either my broker did not send them to me, or plain simple, there is no price for it (usually happens around 5PM EST~7PM EST). With this problem, I am comparing prices at wrong times.


So my question is:
Is there a way to get the Close price of a Currency indexing via time?
 
Use iBarShift function
Reason: