Sorry to pester the forum here with more basic questions (I really am lost when it comes to pine script). So, currently I'm plotting the highs of all weekly red candles, however after reading through the documentation I realized that I'm unable to extend the lines across the screen using plot().
So I'm wondering if there is some way to do this with lines or I'm just missing something. Also I only need it to mark the past 20/30 red candles rather than all of them.
Here's what I got so far (With thanks to a fellow user!):
indicator("My script", overlay=true)
redCandle = (close < open)
timeFrame = input.timeframe("W", title="Time Frame")
[d_h, d_red] = request.security(syminfo.tickerid, timeFrame, [high, redCandle], lookahead=barmerge.lookahead_on)
plot(d_red ? d_h : na, style=plot.style_circles, color=color.green, linewidth=2)
Here is how it looks visually as well at the moment.