admin管理员组文章数量:1390949
good day this is part of my pine script
// Plot MACD components with conditional visibility
plot(macd_active ? macd_line : na, color=color.blue, title="MACD Line", linewidth=2)
plot(macd_active ? signal_line : na, color=color.orange, title="Signal Line", linewidth=2)
plot(macd_active ? histogram : na, style=plot.style_histogram, color=histogram >= 0 ? color.green : color.red, title="Histogram")
plot(0, color=color.gray, title="Zero Line", linewidth=1, style=plot.style_dashed)
I keek getting this error on the last 'plot' in the last string any advice Undeclared identifier 'plot'
good day this is part of my pine script
// Plot MACD components with conditional visibility
plot(macd_active ? macd_line : na, color=color.blue, title="MACD Line", linewidth=2)
plot(macd_active ? signal_line : na, color=color.orange, title="Signal Line", linewidth=2)
plot(macd_active ? histogram : na, style=plot.style_histogram, color=histogram >= 0 ? color.green : color.red, title="Histogram")
plot(0, color=color.gray, title="Zero Line", linewidth=1, style=plot.style_dashed)
I keek getting this error on the last 'plot' in the last string any advice Undeclared identifier 'plot'
Share Improve this question edited Mar 16 at 20:19 jam j 6281 gold badge2 silver badges20 bronze badges asked Mar 15 at 19:31 francois de kokerfrancois de koker 231 silver badge5 bronze badges1 Answer
Reset to default 1plot()
does not have a style called plot.style_dashed
.
Possible values are: plot.style_line
, plot.style_stepline
, plot.style_stepline_diamond
, plot.style_histogram
, plot.style_cross
, plot.style_area
, plot.style_columns, plot.style_circles, plot.style_linebr, plot.style_areabr
, plot.style_steplinebr
.
If you want a dashed line, you can use hline()
instead.
hline(0, "Zero Line", color.gray, hline.style_dashed, 1)
本文标签: pine script v5 Undeclared identifier 39plot39Stack Overflow
版权声明:本文标题:pine script v5 Undeclared identifier 'plot' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744605478a2615327.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论