Refer to Price at time t

 
What is the preferred method of referring to a close at time t?

I tried using iClose, and using a shift value determind by (Time[0] - Time[target])/(60*period()), however, this generated *very strange* results in my indicator.

After mucking about for quite some time, I discovered that the cause of the problem was missing data. When there was missing data, the shifting formula above is incorrect, and my indicator was returning impossible results.

What I need to do is refer to a specific time in the past, regardless of how many bars that exist between now and then...

Any ideas?
 
Nevermind, I found iBarShift(), which i haven't used before...

It does the job.
Reason: