Pinescript 标签不可见

问题描述 投票:0回答:1
if barstate.islastconfirmedhistory
    for i = 0 to 99
        label.new(x=bar_index - i,
                  y=na,
                  yloc=yloc.belowbar,
                  text="x",
                  style=label.style_none,
                  textcolor=color.blue)

仅最后 20 个左右的标签可见。

我想使用标签,因为它还有一个工具提示选项。

文档对此没有任何说明。

有人知道如何解决这个问题吗?

label pine-script pine-script-v5
1个回答
0
投票

必须设置 max_labels_count 参数。

indicator("My Indicator", overlay=true, max_labels_count=500)
© www.soinside.com 2019 - 2024. All rights reserved.