Forums › ProRealTime English forum › ProBuilder support › Modify this Range box indicator please › Reply To: Modify this Range box indicator please
04/11/2019 at 5:39 PM
#96146
This adaptation of Nicolas’ code might be what you want? It resets the rectangles on the first Sunday candle or first trading candle of the week if there are non trading Sundays, Mondays etc. It does not draw a rectangle until a week is completed. Works on any time frame from daily or faster.
1 2 3 4 5 6 7 8 9 10 11 |
maxvalue = max(maxvalue , high) minvalue = min(minvalue , low) if opendayofweek < opendayofweek[1] then DRAWRECTANGLE(x1,maxvalue,barindex-1,minvalue) coloured(0,0,0,0) x1=barindex maxvalue=high minvalue=low endif RETURN |