If there a way to get the shift using timeseries after getting the highest close 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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Given this:
Is there a way to get the shift of the above bar using a combination of ibarshift() iTime() etc? Without using a loop?