Forums › ProRealTime English forum › ProBuilder support › Indicator: drawn not on all bars › Reply To: Indicator: drawn not on all bars
04/03/2020 at 7:21 PM
#124556
Here you go – exactly what you asked for drawn using SEGMENT.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
defparam drawonlastbaronly = true size = averagetruerange[20] lasty=close drawsegment(barindex-14,lasty,barindex-13,lasty + size)coloured(238,154,0) lasty=lasty+size drawsegment(barindex-13,lasty,barindex-12,lasty + size)coloured(238,154,0) lasty=lasty+size drawsegment(barindex-12,lasty,barindex-11,lasty + size)coloured(238,154,0) lasty=lasty+size drawsegment(barindex-11,lasty,barindex-10,lasty + size/2)coloured(238,154,0) lasty=lasty+size/2 drawsegment(barindex-10,lasty,barindex-9,lasty)coloured(238,154,0) drawsegment(barindex-9,lasty,barindex-8,lasty - size/2)coloured(238,154,0) lasty=lasty-size/2 drawsegment(barindex-8,lasty,barindex-7,lasty - size)coloured(238,154,0) lasty=lasty-size drawsegment(barindex-7,lasty,barindex-6,lasty + size)coloured(238,154,0) lasty=lasty+size drawsegment(barindex-6,lasty,barindex-5,lasty + size/2)coloured(238,154,0) lasty=lasty+size/2 drawsegment(barindex-5,lasty,barindex-4,lasty)coloured(238,154,0) drawsegment(barindex-4,lasty,barindex-3,lasty - size/2)coloured(238,154,0) lasty=lasty-size/2 drawsegment(barindex-3,lasty,barindex-2,lasty - size)coloured(238,154,0) lasty=lasty-size drawsegment(barindex-2,lasty,barindex-1,lasty - size)coloured(238,154,0) lasty=lasty-size drawsegment(barindex-1,lasty,barindex,lasty - size)coloured(238,154,0) lasty=lasty-size return |