Michael Slattery
Michael Slattery

Reputation: 39

I want to "fill" between two extended line.new. pine-script is not having it ;√)

[pine-script] "Fill," between two extended lines? line.new(bar_index[3], LAG_SHORT_CNT, & line.new(bar_index[3], LAG_SHORT_CNT7

Upvotes: 0

Views: 802

Answers (2)

doppelgunner
doppelgunner

Reputation: 649

You can use plot() instead. Draw the lines with condition:

plot_line1 = plot(condition_01 ? line_01 : na)
plot_line2 = plot(condition_02 ? line_02 : na)
fill(plot_line1, plot_line2)

Upvotes: 0

bbnm
bbnm

Reputation: 1094

Unfortunately this is not possible with the current version of pinescript, maybe in the future. For now you can only use fill() with either plot() or hline().

Upvotes: 1

Related Questions