绘制最后一个(当前)柱的值

时间:2020-03-04 20:38:15

标签: 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)

这样,它不会在实际柱线上绘制任何值。 如何将第一条线向右延伸?

1 个答案:

答案 0 :(得分:1)

尝试

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)