Hi,
I'm currently using 8.0 build 782.
My question regarding time synchronization is this. If i'm plotting 1-min chart and would like to retrieve the OHLC from the 5-min chart. How can i achieve that?
I tried a little print script below but the result didn't turn out to be what I wanted.
debugPrintln(day(0)+" "+hour(0)+":"+minute(0)+" ES "+close(0,inv("5"))+" "+close(-1,inv("5"))+" "+close(-2,inv("5"))+" "+close(0)+" "+close(-1));
My result is that it prints every minute the close(0) and close(-1) correctly, but the close(0,inv("5")) keeps changing which should not be the case as a 5-min data should only change every 5 minutes.
Please advise.
W
I'm currently using 8.0 build 782.
My question regarding time synchronization is this. If i'm plotting 1-min chart and would like to retrieve the OHLC from the 5-min chart. How can i achieve that?
I tried a little print script below but the result didn't turn out to be what I wanted.
debugPrintln(day(0)+" "+hour(0)+":"+minute(0)+" ES "+close(0,inv("5"))+" "+close(-1,inv("5"))+" "+close(-2,inv("5"))+" "+close(0)+" "+close(-1));
My result is that it prints every minute the close(0) and close(-1) correctly, but the close(0,inv("5")) keeps changing which should not be the case as a 5-min data should only change every 5 minutes.
Please advise.
W
Comment