I am trying to achieve a horizontal ray from the weekly close of the past 52 weeks that can be seen on all time frames. The below appears to achieve this on the weekly time frame.
//@version=4
study("Open Ray to right", overlay=true)
higherTF1 = input("W", type=input.resolution)
dailyopen = security(syminfo.tickerid, higherTF1, open)
line1 = line.new(x1=bar_index[1], y1=dailyopen, x2=bar_index, y2=dailyopen,
xloc=xloc.bar_index, style=line.style_solid,extend=extend.right, color=color.green)
It produces the following:
However it doesn't seem to have the amount amount on lower time frames such as on the 1h:
I can get this to work with the following:
study("PCL", overlay=true)
prev_daily_close = security(tickerid, "W", close[1])
plot(prev_daily_close, title="PCL", trackprice=false, style=circles)
However the lines are plotted with circles rather than horizontal rays. I would like them to run extended across the chart.
Thanks in advance.


