Indicator · Pine Script v6 · Own pane

Webby RSI

by peterdmv

The Webby RSI indicator calculates a momentum oscillator by measuring price distance to a 21 EMA in 50 ATR units.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code69
Settings13inputs
LicenceMPL-2.0
Last update8 weeks ago30 Aug 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

69 lines of Pine Script v6 from indicators/WebbyRSI.pine, published under MPL-2.0. Keep the author's credit and licence lines when you reuse it.

WebbyRSI.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © peterdmv
//
// Recreation of Webby's RSI Beta v5.150 (Mike Webster's Really Simple Indicator). Reimplemented for educational purposes.
//
// Release: v1

//@version=6
indicator(title="Webby RSI", shorttitle="Webby RSI", format=format.price, precision=2)

// INPUTS
ema_len     = input.int(21,  "EMA Length",                  minval=1)
atr_len     = input.int(50,  "ATR Length (50d)",             minval=1)
sma_len     = input.int(10,  "SMA Length (10d)",             minval=1)
hist_ma_len = input.int(10,  "Histogram MA Length",          minval=1)

warn_level  = input.float(3.0, "Warning Level",  step=0.5)
caution_lo  = input.float(2.0, "Caution Low",    step=0.5)

show_caution_line = input.bool(true, "Show Caution Line")

// COLORS
col_normal        = input.color(color.new(#00BCD4, 20), "Bar Color (Normal)")
col_warn          = input.color(color.new(#52ff89, 20), "Bar Color (Warning)")
col_negative      = input.color(color.new(#FF9800, 20), "Bar Color (Negative/Below EMA)")
col_negative_ext  = input.color(color.new(#F44336, 20), "Bar Color (Negative/Extreme >3 ATR)")
col_ma            = input.color(color.new(#FF9800, 0),  "MA Line Color")
col_warn_ln  = input.color(color.new(#F44336, 70), "Warning Line Color")

// CORE CALCULATIONS
ema21 = ta.ema(close, ema_len)
atr50 = ta.atr(atr_len)

low_ext  = (low  - ema21) / atr50
high_ext = (high - ema21) / atr50

// Positive when low is above EMA, negative when high is below EMA
rsi_val = low >= ema21 ? low_ext : high_ext

// Smoothed MA of the histogram value
hist_ma = ta.ema(rsi_val, hist_ma_len)

// Flip negative bars above zero so all columns render above the baseline
plot_val    = math.abs(rsi_val)
plot_ma_val = math.abs(hist_ma)

// Color: negative bars are red above 3 ATR, orange below; positive bars are green at warning level, else cyan
bar_col = rsi_val < 0 ? (plot_val >= warn_level ? col_negative_ext : col_negative) : rsi_val >= warn_level ? col_warn : col_normal

// PLOTS
plot(plot_val,    title="RSI Value",    style=plot.style_columns, color=bar_col, linewidth=1)
plot(plot_ma_val, title="Histogram MA", color=col_ma, linewidth=2)

// Reference lines
hline(0,          "Zero Line",     color=color.new(color.gray, 60), linestyle=hline.style_dashed)
hline(warn_level, "Warning Level", color=col_warn_ln,               linestyle=hline.style_solid, linewidth=2)
hline(caution_lo, "Caution Low",   color=show_caution_line ? color.new(color.gray, 40) : color.new(color.gray, 100), linestyle=hline.style_dotted)

// BACKGROUND COLORING
bgcolor(rsi_val >= warn_level ? color.new(#FF5252, 92) : na, title="Warning Background")

// LABEL showing current value on last bar
if barstate.islast
    label.new(bar_index, plot_val,
         text      = str.tostring(rsi_val, "#.##"),
         style     = label.style_label_left,
         color     = color.new(color.black, 100),
         textcolor = color.white,
         size      = size.small)

Overview

The value smooths into a 10 SMA histogram MA. It plots the absolute value as colored columns and the MA as a line in a separate pane. Inputs adjust EMA, ATR, SMA, and histogram MA lengths, warning level, caution low, and caution line display. Color states indicate normal, warning, negative below EMA, and extreme negative. Reference lines mark zero, warning, and caution. As a recreation for educational purposes, it lacks trading signals or exit rules.

Details

Published by

peterdmv on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum, Moving averages, Volatility & bands

Markets

Stocks

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
EMA Lengthint21ema_len
ATR Length (50d)int50atr_len
SMA Length (10d)int10sma_len
Histogram MA Lengthint10hist_ma_len
Warning Levelfloat3.0warn_level
Caution Lowfloat2.0caution_lo
Show Caution Linebooltrueshow_caution_line
Bar Color (Normal)colorcolor.new(#00BCD4, 20)col_normal
Bar Color (Warning)colorcolor.new(#52ff89, 20)col_warn
Bar Color (Negative/Below EMA)colorcolor.new(#FF9800, 20)col_negative
Bar Color (Negative/Extreme >3 ATR)colorcolor.new(#F44336, 20)col_negative_ext
MA Line Colorcolorcolor.new(#FF9800, 0)col_ma
Show all 13 settings
SettingTypeDefaultVariable
Warning Line Colorcolorcolor.new(#F44336, 70)col_warn_ln
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

MACD-V

by harryguiacorn
219 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V

MultiIndicator

by capissimo
114 stars

MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MultiIndicator

PPO ATR Bands

by cryptorife
75 stars

PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

This indicator plots a relative strength index in a separate pane. It calculates RSI from the average of the previous ten opens rather than the current bar, so that source does not change during the live candle. A moving average of the RSI is plotted and can b

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of No Repaint - Relative Strength Index

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