我如何在 tradingview 图表上显示自定义指标的标题

how do i display the title of a custom indicator on trading view chart

我有一个用 pinescript 构建的自定义 9 ema 指标,我想在每条 ema 线的右边显示它们各自的 ema 数。我不知道该怎么做。 到目前为止,这是我的代码,9 个 emas 中的 2 个。我也拍了照片

//indicator(title='3ema', shorttitle='9EMA', overlay=true, timeframe="", timeframe_gaps=true)


//Format for a 3
len1 = input.int(3, minval=1, title='Length')
src1 = input(close, title='Source')
out1 = ta.ema(src1, len1)
plot(out1,  color=color.new(color.green, 0), title='3' )
//End of format

//Format for a 8
len2 = input.int(8, minval=1, title='Length')
src2 = input(close, title='Source')
out2 = ta.ema(src2, len2)
plot(out2, color=color.new(color.yellow, 0), title='8')
show_title8 = input.bool(title='8',defval=true)
//End of format

你不能直接这样做。

您可以做的一件事是启用指标名称和值标签。