Plot 也为最后一个(当前)条形图绘制一个值

Plot 也为最后一个(当前)条形图绘制一个值,plot,pine-script,Plot,Pine Script,我正在绘制一条每月更改其值的线: lastmonth_high = security(syminfo.tickerid, "M", high) plot(lastmonth_high, color=lastmonth_high != lastmonth_high[1] ? na : color.blue, style=plot.style_line, linewidth=3) 这样,它就不会在实际条形图上绘制任何值。 如何将线条向右延伸一条?试试这个 lastmonth_high = sec

我正在绘制一条每月更改其值的线:

lastmonth_high = security(syminfo.tickerid, "M", high) 
plot(lastmonth_high, color=lastmonth_high != lastmonth_high[1] ? na : color.blue, style=plot.style_line, linewidth=3)
这样,它就不会在实际条形图上绘制任何值。 如何将线条向右延伸一条?

试试这个

lastmonth_high = security(syminfo.tickerid, "M", high, lookahead = barmerge.lookahead_on)
plot(lastmonth_high, color=lastmonth_high != lastmonth_high[1] ? na : color.blue, style=plot.style_line, linewidth=3)

非常感谢。我测试过了。。。它一直绘制到最后一个条形图,但是当前月份的整行在上个月的值和它应该在的位置之间……你的意思是
lastmount\u high
是上个月关闭/确认的条形图的高值吗?是的,它应该只绘制下个月最后一个月的值!我还想在当前的条上画一个图。。。该值始终与我现在在倒数第二个BAR上看到的值相同可能您需要
lastmount\u high=security(syminfo.tickerid,“M”,high[1],lookahead=barmerge.lookahead\u on)