Minimal Fill Examples
Category: trend, volatility
A demonstration script showcasing various visual fill techniques in Pine Script, including price-to-level fills, moving average ribbons, conditional color fills, and gradient fills between horizontal levels.
Formula
\\text{Fill 1: } [Close, 0] \\\\ \\text{Fill 2: } [SMA(10), SMA(20)] \\\\ \\text{Fill 3 (Conditional): } [Close, SMA(20)] \\text{ where color } = \\begin{cases} Green & Close > SMA(20) \\\\ Red & Close \\le SMA(20) \\end{cases} \\\\ \\text{Fill 4 (Gradient): } [Level_{Top}, Level_{Bottom}] \\text{ with linear color interpolation.}
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, usage in published strategies and more on WOBR StrategyVerse.