how to get shift by time?

 
Hi all,

I'm working on an indicator that uses several timeframes' indicatorX's
value. And then, I need to use the shift value of each of them, in
regard to a specific history time point.

Let me put it this way:

"datetime iTime( string symbol, int timeframe, int shift)
Returns Time value for the bar of indicated symbol with timeframe and
shift. If local history is empty (not loaded), function returns 0."

I need to do it contrary ---- give me a time point in history, how can
I get "shift"? Assume that current chart is M30.

Thanks.
 
use iBarShift()
Reason: