问题
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