I try to draw a simple horizontal line in the indicator pane, but this does not work:
var float maxLevel := ta.highest(myseries, 52)
hline(show_maxLevel ? maxLevel : na, "52-Week Max", color=color.red, linestyle=hline.style_solid)
I’m getting the error that ‘hline’ was called with an argument of ‘series float’ type, but a ‘input float’ is expected.”
—> So do I have to use plot() instead of hline()?? I only want it to show the max value of the last year, as a simple horizontal line. No variation over time.
Can anyone help?