Reputation: 610
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.
Upvotes: 8
Views: 22214
Reputation: 1
Use the below -
Change the end part based on your requirement, set
style=plot.style_dashed
Upvotes: -4
Reputation: 8779
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)
Upvotes: 16