pt=50
diff=pt*pipvalue
once nextHighlevel=high
once nextLowlevel=low
if high>nextHighlevel then
drawsegment(prevx,high,barindex,high)coloured("green")
nextHighlevel=high+diff
nextLowlevel=high-diff
//drawsegment(barindex+5,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
//drawsegment(barindex+5,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
prevx=barindex
endif
if low<nextLowlevel then
drawsegment(prevx,low,barindex,low)coloured("red")
nextLowlevel=low-diff
nextHighlevel=low+diff
//drawsegment(barindex+5,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
//drawsegment(barindex+5,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
prevx=barindex
endif
if islastbarupdate then
drawsegment(prevx,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
drawsegment(prevx,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
endif
return