How can I draw the Daily High(1) Daily Low(1) as dotted line? Code is drawing the lines, but not a dotted line! I trying do work with style(dottedline,1), but it seems not possible with DRAWHLINE. Can I store the DRAWHLINE in a variable?
DEFPARAM DrawOnLastBarOnly = True
IF OpenDayOfWeek = 1 THEN //one more day to look back on Monday
PastBars = 2
ELSE
PastBars = 1
ENDIF
IF IntraDayBarIndex = 0 THEN
x = Dhigh(PastBars)
y = Dlow(PastBars)
ENDIF
DRAWHLINE(x) coloured(255,0,255,255)
DRAWHLINE(y) coloured(255,0,255,255)
RETURN
The DRAWHLINE instruction still don’t have any styling possible (but it should be added soon).
The only way to deal with styling is by using the values as returned ones, remove the drawhline instructions and replace the RETURN (last line) line with this code:
RETURN x coloured(255,0,255,255) style(dottedline,1), y coloured(255,0,255,255) style(dottedline,1)
You can learn more about styling returned variables in this page: STYLE
Thank you a lot for your support, Nicolas 🙂