Rolling-Range Normalization for Automatic Indicator Color Gradients
Summary
This document presents a reusable method for coloring a plotted series according to its position within a recent rolling range. The function finds the highest and lowest source values over a chosen lookback, scales the current value into one of eleven color steps, and selects that step from a palette theme. The source can be negated to reverse the color progression, and users can add palettes by supplying eleven ordered shades per theme.
The example applies the framework to an average of normalized Bollinger Band %B and RSI readings, with several palette choices and reference levels. The indicator is primarily a visualization component: colors communicate relative position within the selected lookback and do not establish trading signals or demonstrate profitability. The scaling can be undefined when the rolling high equals the rolling low, and the document provides no systematic evaluation of how the colors affect decisions.
Key ideas
- The color function maps a series into eleven bins based on its rolling minimum and maximum.
- A lookback parameter controls the range used for normalization.
- Palette themes can be customized, and negating the input reverses the gradient direction.
- The example colors a combined normalized Bollinger Band and RSI series.
- The framework visualizes relative values but does not validate a trading edge.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.