0

Yes, this sounds crazy but it makes sense to me. I'm trying to figure out how to plot all historical opens and closes of weekly candles as horizontal lines in any timeframe so I don't have to manually draw them every time I work with a new chart and so that I can toggle them on and off without having to redraw them if I remove them.

So far I've only been able to get a continuous line that looks like steps. What I want is actual horizontal lines extending left and right or at least right.

I think this is probably extremely simple, but not sure what I'm doing. Hope someone can help me.

I tried the below, but obviously didn't come out as expected.

//Displays all weekly open and close levels
//@version=5
indicator(title = "Weekly Levels", overlay = true)

//Variables
wo = request.security(syminfo.tickerid, "W", open)
wc = request.security(syminfo.tickerid, "W", close)

//Plots
plot(wo, color = color.rgb(43, 154, 245), linewidth=1)
plot(wc, color = color.rgb(245, 241, 2), linewidth=1)

How I'd like my 15m chart to look with this indicator applied.

vannnnnn
  • 1
  • 1

0 Answers0