Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to plot a dashed line on pine script V4?

Tags:

pine-script

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.

like image 242
Idris Avatar asked Nov 14 '19 10:11

Idris


1 Answers

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)
like image 123
PineCoders-LucF Avatar answered Sep 30 '22 23:09

PineCoders-LucF