如何在 pine script V4 上绘制虚线? [英] How to plot a dashed line on pine script V4?
本文介绍了如何在 pine script V4 上绘制虚线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
试图绘制一条普通的系列线,但使用松树脚本的 V4 我找不到如何设置样式?
Trying to plot a normal serie line but with the V4 of pine script I can't find how to set the style?
这给了我一个错误:
plot(my_serie, color=color.blue,linewidth=2, style=line.style_dashed)
感谢任何帮助.
推荐答案
plot()
没有虚线样式.这将打开和关闭颜色以实现效果:
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)
这篇关于如何在 pine script V4 上绘制虚线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文