Indicator · Pine Script v6 · Own pane

Radiant Mean Reversion Channels [Pineify]

by eddiebelaval· code credited to Pineify

This indicator builds a channel from a Hull moving average of the source and an ATR scaled by a band multiplier, then normalizes price inside that channel into a 0 to 100 oscillator.

View on GitHub

GitHub stars7on the repository
Pine versionv6current
Lines of code92
Settings7inputs
LicenceNone statedfile: MPL-2.0
Last update3 months ago24 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

92 lines of Pine Script v6 from pinescript/momentum/radiant-mean-reversion-channels-pineify.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

radiant-mean-reversion-channels-pineify.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify

//======================================================================//
//                    ____  _            _  __                          //
//                   |  _ \(_)_ __   ___(_)/ _|_   _                    //
//                   | |_) | | '_ \ / _ \ | |_| | | |                   //
//                   |  __/| | | | |  __/ |  _| |_| |                   //
//                   |_|   |_|_| |_|\___|_|_|  \__, |                   //
//                                             |___/                    //
//======================================================================//


//@version=6
indicator("Radiant Mean Reversion Channels [Pineify]", shorttitle="Pineify - Radiant Channels", overlay=false)

// -----------------------------------------------------------------------------
// SETTINGS
// -----------------------------------------------------------------------------
group_calc = "Calculation"
len     = input.int(21, "Channel Length", minval=1, group=group_calc, tooltip="The lookback period for the Mean and Volatility.")
mult    = input.float(2.0, "Band Multiplier", step=0.1, group=group_calc, tooltip="Expands the width of the channel. Higher values = fewer signals.")
smooth  = input.int(3, "Oscillator Smoothing", minval=1, group=group_calc, tooltip="Smooths the main line to reduce noise.")
src     = input.source(close, "Source", group=group_calc)

group_style = "Visuals"
col_bull = input.color(#089981, "Bullish Color", group=group_style)
col_bear = input.color(#f23645, "Bearish Color", group=group_style)
col_neu  = input.color(#2962ff, "Neutral Color", group=group_style)

// -----------------------------------------------------------------------------
// CALCULATIONS
// -----------------------------------------------------------------------------

// 1. Define the Mean (Center)
// We use HMA (Hull Moving Average) for the mean because it reduces lag while staying smooth.
mean = ta.hma(src, len)

// 2. Define the Volatility Bands (Width)
// We use ATR (Average True Range) to measure volatility.
volatility = ta.atr(len) * mult

// 3. Create the Channel Extremities
upper_band = mean + volatility
lower_band = mean - volatility

// 4. Normalize Price into an Oscillator (0 to 100)
// This converts the chart channel into a sub-chart oscillator.
// Formula: (Price - Lower) / (Upper - Lower) * 100
raw_osc = (src - lower_band) / (upper_band - lower_band) * 100

// 5. Smooth the Oscillator
osc = ta.wma(raw_osc, smooth)

// -----------------------------------------------------------------------------
// PLOTTING & VISUALS
// -----------------------------------------------------------------------------

// Dynamic Gradient Color for the Oscillator Line
osc_color = color.from_gradient(osc, 0, 100, col_bear, col_bull)

// Plot the Main Oscillator
plot(osc, "Radiant Oscillator", color=osc_color, linewidth=2)

// Plot Key Levels
h_ob = hline(90, "Extreme Overbought", color=color.new(col_bear, 50), linestyle=hline.style_dotted)
h_top = hline(80, "Overbought", color=color.new(col_bear, 50))
h_mid = hline(50, "Mean (Equilibrium)", color=color.new(color.gray, 50), linestyle=hline.style_solid)
h_bot = hline(20, "Oversold", color=color.new(col_bull, 50))
h_os = hline(10, "Extreme Oversold", color=color.new(col_bull, 50), linestyle=hline.style_dotted)

// Beautiful Fills
fill(h_top, h_ob, color=color.new(col_bear, 85), title="Bearish Zone")
fill(h_bot, h_os, color=color.new(col_bull, 85), title="Bullish Zone")

// -----------------------------------------------------------------------------
// SIGNALS
// -----------------------------------------------------------------------------

// Generate Signals based on "Reversion to Mean"
// Buy when price crosses back ABOVE 20 (leaving oversold)
// Sell when price crosses back BELOW 80 (leaving overbought)
long_signal  = ta.crossover(osc, 20)
short_signal = ta.crossunder(osc, 80)

// Plot Signals
plotshape(long_signal, "Buy Signal", shape.circle, location.bottom, color=col_bull, size=size.tiny, offset=0)
plotshape(short_signal, "Sell Signal", shape.circle, location.top, color=col_bear, size=size.tiny, offset=0)

// Alert Conditions for automation
alertcondition(long_signal, "Radiant Buy", "Price is reversing from oversold conditions")
alertcondition(short_signal, "Radiant Sell", "Price is reversing from overbought conditions")

Overview

Radiant Mean Reversion Channels [Pineify] smooths the result with a weighted moving average and plots the line in a separate pane with a bullish-to-bearish gradient. Horizontal levels mark extreme overbought, overbought, equilibrium, oversold, and extreme oversold, with fills between the outer zones. Length, multiplier, smoothing, and source change the calculation. It has no entry, exit, or stop rules.

Details

Published by

eddiebelaval on GitHub

Code credit

Pineify, as written in the script's header

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Mean reversion, Volatility & bands, Moving averages

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Channel Lengthint21len
Band Multiplierfloat2.0mult
Oscillator Smoothingint3smooth
Sourcesourceclosesrc
Bullish Colorcolor#089981col_bull
Bearish Colorcolor#f23645col_bear
Neutral Colorcolor#2962ffcol_neu
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

3 stars

This indicator estimates how many bars typically pass before a custom skew measure falls back below its exponential moving average. It builds the skew from smoothed upside and downside true-range deviations, then applies five fixed EMA lengths from 2 to 110. O

Indicator v5 Mean reversionMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Average Bars Before Reversion
2 stars

Calculates custom exponential moving averages and standard deviation envelopes based on price offsets and lookback windows. It plots dynamic channel bands, mean reversion zones, and squeeze indicators in a separate pane. Users can adjust the moving average len

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of [CBB] Rising Falling Color Band

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]

Kalman Percentile Bands

by NQ-stats-MX
15 stars

Kalman Percentile Bands plots a volatility-adaptive Kalman mean along with three empirical percentile bands on each side of the price chart. It calculates a local-level Kalman filter as the fair value mean, normalizes price deviations by an EWMA of volatility,

Indicator v6 Mean reversionVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Kalman Percentile Bands
6 stars

This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th

Indicator v6 TrendVolatility & bands
Updated 8 weeks ago · MIT GitHub repository of Capital41 Regime Matrix v3

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers