Text ';文本'=序列[string]到常量字符串

Text ';文本'=序列[string]到常量字符串,text,pine-script,Text,Pine Script,我试图列出一行中看涨或看跌蜡烛的数量,为此,我使用plotshape,并保留一个计数器来计数,但我在写入值时遇到问题 c = 1 if bull and bull[1] c := c + 1 plotshape(bull, style=shape.triangledown, location=location.abovebar, color=color.green, text = tostring(c)) 如何将'text'=series[string]转换为常量字符串 我找到了函数

我试图列出一行中看涨或看跌蜡烛的数量,为此,我使用plotshape,并保留一个计数器来计数,但我在写入值时遇到问题

c = 1
if bull and bull[1]
    c := c + 1

plotshape(bull, style=shape.triangledown, location=location.abovebar, color=color.green, text = tostring(c))
如何将
'text'=series[string]
转换为常量字符串


我找到了函数
label.new(…)
,但我正在寻找整个序列中的某些内容,这些标签只出现在蜡烛的最后一部分中

您可以使用
label.new()
,尝试以下方法:

if bull
    label.new(bar_index, high, text=tostring(c), style=label.style_label_down)

我知道label.new()函数存在,但是我可以放置的标签数量似乎不够,我希望这样做:您可以在
中传递一个参数(“我的脚本,…,max\u labels\u count=500)
,500是您可以拥有的最大标签数量,我认为这应该足够了