PlotShape - {{价格}} - PineScript - V5
I wrote a trailing stop loss script. I want the code to display the price where the stoploss was hit.
But it is displaying {{Price}} as a string, and not the actual number of the bar where the stoploss was hit.
Anyone know how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法使用
plotshape()
函数来做到这一点。它需要一个const string
,这意味着该值必须在编译时已知。您可以使用
标签
代替。示例来自此处。它将绘制条形指数和最高价格。
You cannot do that with the
plotshape()
function. It expects aconst string
, which means the value must be known at compile time.You can use
label
instead.Example from here. It will plot the bar index and high price.