Pinecoders Colors Gradient script URL
The framework:
— Allows the selection of one of 3 color schemes, each containing a pair of bull/bear colors.
— Generates 16-level gradients for each bull/bear color.
— Uses two types of gradient calculations: one for unbounded and one for bounded signals. We call the modes: Advance/Decline and Relative.
Features
These gradients are designed to work with 2 base colors for each element you want to color: one color for bullish and one for bearish conditions. Each base color can be generated in 16 shades, for a total of 32 possibilities for each graphic element (e.g., the fill between two MAs or a MACD histogram). Each gradient is expressed internally as a float from zero to ten. Any value <= 0.625 returns the lightest shade. Any value > 9.375 returns the brightest shade.
Two modes of gradient generation are offered:
► 1. Advance/Decline
This mode is better for unbounded signals. To determine brightness, it uses advances/declines of the signal rather than its relative position in a fixed range.
► 2. Relative
This mode is preferable for bounded signals such as RSI .
It uses the relative position of the signal in its range to determine the gradient.