Minimal Fill Examples
Category: trend
A demonstration script showcasing various methods to use the fill() function in Pine Script, including filling between plots, hlines, conditional coloring, and gradients.
Formula
\begin{cases} Fill_{1} = \text{Area between } close \text{ and } 0 \\ Fill_{2} = \text{Area between } SMA(10) \text{ and } SMA(20) \\ Fill_{3} = \text{Conditional area between } close \text{ and } SMA(20) \text{ based on sign of } (close - SMA(20)) \\ Fill_{4} = \text{Gradient between } HLine(top) \text{ and } HLine(bottom) \end{cases}
Inputs
- Top Value (default: 100)
- Bottom Value (default: 0)
- Top Color (default: color.red)
- Bottom Color (default: color.blue)
- Hline 1 Value (default: 20)
- Hline 2 Value (default: 10)
See signal primitives and every published strategy that uses Minimal Fill Examples on WOBR StrategyVerse.