I am playing with an indicator idea that draws its own candles. I also want some lines shown on the indicator but they are hidden under the candles. Is there any way to have the lines on top of the candles?
[attachment file=81761]
Try to draw segments between each value of your curve and place this code just after the DRAWCANDLE instructions.
Or use low alpha value to make your adapt the transparency of your custom candlesticks.
Thanks Nicolas. I had already tried the transparency thing but did not like the results. The SEGMENT is the best solution. I knew there was a simple solution!
Also a tip for others – keep the values in your RETURN line as well as drawing a segment and then you still get the labels on the chart.
mp = ((hh - ll) / 2) + ll
wa = weightedaverage[x]
DRAWCANDLE(op,hh,ll,close) COLOURED(R,G,0) BORDERCOLOR(0,0,0)
DRAWSEGMENT(barindex-1,wa[1],barindex,wa)coloured(0,0,255)
DRAWSEGMENT(barindex-1,mp[1],barindex,mp)coloured(0,0,0)
return mp COLOURED(0,0,0) style(line, 1) as "Median Price", wa COLOURED(0,0,255) style(line, 1) as "Weighted Average"
[attachment file=81774]