//@version=5
indicator(title="Weeks_OC", shorttitle="Weeks_OC", overlay=true)
w_close = request.security(syminfo.tickerid, "W", close, barmerge.gaps_off, barmerge.lookahead_on)
w_open = request.security(syminfo.tickerid, "W", open,barmerge.gaps_off, barmerge.lookahead_on)
p1=plot(w_open,title='w_open', color = w_close >= w_open ? color.blue : color.red, style=plot.style_stepline, linewidth=3)
p2=plot(w_close,title='w_close',color = w_close >= w_open ? color.blue : color.red, style=plot.style_stepline, linewidth=3)
fill(plot1=p1, plot2=p2, color = w_close >= w_open ? color.blue : color.red)
PineScript v5
显示一周开盘收盘区域的简单指标。当给定的绘图处于阶梯线时,填充功能似乎无法正常工作