'fill background color between 2 lines.new in pinescript
I am trying to fill the background color between these 2 lines and I am getting the following error messages:
line 104: Syntax error at input 'bullEngulfLow'.
I am using the following code.
if barstate.islastconfirmedhistory
fillColor = switch
bullEngulfOpen > bullEngulfLow => color.green
=> color.silver
linefill.new(bullEngulfOpen, bullEngulfLow, color.new(fillColor, 90))
bullEngulfOpen := line.new(bar_index - 1, resopen[1], bar_index, resopen[1], extend=extend.right, color=color.black)
bullEngulfLow := line.new(bar_index - 1, bullEngulfLowPrice, bar_index, bullEngulfLowPrice, extend=extend.right, color=#01ff00)
How do I fill the background color between these 2 lines?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
