No so critical update:
When you update the script, you update the screenshot.
Instead of a description as the last screenshot was, here is an application.
The color gradient is applied to an RCI() to determine a trend color
The RCI value is highly dependent on the lookback distance. This is the same 10 minute chart, but it has a 4h EMA 15 overlaid on it.
The RCI bar color is based on the 15 period RCI on the 4h chart, which is 240 bars. (15 bars x 240m chart) = 3600m divided in to 10m periods = 360 10m bars.
Thus the RCI length is an RCI(360). And though price looks sideways to down, we're actually in a 4h uptrend in the S&P.
What the included function is doing is determining how many bars back the RCI() should include in order to capture 15 4h bars.