If there a way to get the shift using timeseries after getting the highest close without using a loop?

 

Given this:

Close[iHighest(NULL,0,MODE_HIGH,nLength,1)]);  //<---- get highest close

Is there a way to get the shift of the above bar using a combination of ibarshift() iTime() etc? Without using a loop?

 

Instead of . . .

Close[iHighest(NULL,0,MODE_HIGH,nLength,1)]);  //<---- get highest close

do this . . .

int Highest = iHighest(NULL,0,MODE_HIGH,nLength,1);  //  <---- returns the barshift of the highest bar

Close[Highest];    //<---- get highest close
 

if you want the highest close it should be

int bar = iHighest(NULL,0,MODE_CLOSE,nLength,1);  //<---- get highest close
int time = iTime(NULL,0,bar);
int shift = iBarShift(NULL,0,time);
 
19730719:

if you want the highest close it should be

bar = shift so why do

int shift = iBarShift(NULL,0,time);
 

only did what the op asked for

 
RaptorUK:

bar = shift so why do


Thanks to both of you I really appreciate it.
Reason: