Hi,
I am not a programmer and looking for help to create an indicator to plot 15 minutes high-low range on a 1-minute chart.
Please see the example in the attached image, I draw the line manually on a chart.
Any help would be much appreciated.
There you go:
DEFPARAM CalculateOnLastBars=1000
IF OpenMinute MOD 15 = 0 THEN
HH = high
LL = low
ENDIF
HH = max(HH,high)
LL = min(LL,low)
RETURN HH AS "High",LL AS "Low"
This adaptation of Roberto’s code is a little closer to what you drew.
DEFPARAM CalculateOnLastBars=1000
IF OpenMinute MOD 15 = 0 THEN
DRAWSEGMENT(start,hh,barindex,hh)
DRAWSEGMENT(start,ll,barindex,ll)
start = barindex
HH = high
LL = low
ENDIF
HH = max(HH,high)
LL = min(LL,low)
RETURN
Thank you so much Vonasi.