How to plot a dashed line on pine script V4?

半世苍凉 提交于 2019-12-24 06:44:00

问题


Trying to plot a normal serie line but with the V4 of pine script I can't find how to set the style?

This gives me an error :

plot(my_serie, color=color.blue,linewidth=2, style=line.style_dashed)

Any help appreciated.


回答1:


There is no dashed style for plot(). This turns the color on and off to achieve the effect:

plot(my_serie, color=bar_index % 2 == 0 ? color.blue : #00000000, linewidth=2)


来源:https://stackoverflow.com/questions/58854071/how-to-plot-a-dashed-line-on-pine-script-v4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!