Webby’s RSI (really simple indicator) is a technical indicator to gauge the health of an uptrend. The concept of Webby’s RSI and the original implementation was created by Mike Webster. In this post I’ll share a Pine Script version of Webby’s RSI that you can use on TradingView.

Webby’s RSI, most often used with the Nasdaq Composite, is the percentage of the low vs. the 21-day moving average. At the beginning of a bull market, the higher the value, the better.

If you are familiar with TradingView and would like to install the indicator, you can find Webby’s RSI here.

Before we get into the code, here’s how Webby’s RSI looks as originally developed by Mike:


Webby’s RSI in TradingView – Four Plot Types Available

The default plot option I created for Webby’s RSI is a histogram, this is the closest representation to the original Webby’s RSI. The ideal range of 0.5% and 2.0% is shown with the green lines on the indicator. The fuchsia line is the 10-day moving average of Webby’s RSI.

The additional options I’ve added include column, line and area. Each are shown below.

Webby’s RSI in Pine Script

The code for Webby’s RSI is shown below. If you use the code in your own indicator, please keep the header comment with the links intact.


//@version=4

// Please don't remove this header comment 
//
// Webby's RSI (Really Simple Indicator)
// Plot percentage of the day's low vs 21-day EMA.
//
// Webby's RSI was created by Mike Webster
// @mwebster1971 http://twitter.com/mwebster1971
//
// More details on Webby's RSI
// https://www.investors.com/market-trend/stock-market-update-raging-bull-rests/
//
// Pine Script version by John Muchow
// @JohnMuchow http://twitter.com/JohnMuchow
// Web: https://PlayTheTrade.com

study(title = "Webby's RSI")

//---------------------------------------------------------
// Inputs - User configurable values
//----------------------------------------------------------
plotStyle = input(title="Plot Style", defval="Histogram", options=["Histogram", "Columns", "Line", "Area"])
movingAverageLength = input(title = "Moving Average (5 - 50)", type = input.integer, defval = 10, minval = 5, maxval = 50)

//---------------------------------------------------------
// Calculations
//----------------------------------------------------------
// 21-day EMA of close
_21DayExpMovingAverage = ema(close, 21)

// Webby's RSI data point - percent of day's low vs 21-day EMA
lowVs21DayMovingAverage = (((low - _21DayExpMovingAverage) / close) * 100)

// Simple moving average of data points 
movingAverage = sma(lowVs21DayMovingAverage, movingAverageLength)

//----------------------------------------------------------
// Show horizontal lines on graph at specified intervals
//----------------------------------------------------------
hline(0, title = "0 line", color = color.white, linestyle = hline.style_solid, editable = false)
hline(.5, title = ".5 line", color = color.green, linestyle = hline.style_solid, editable = false)
hline(2, title = "2 line", color = color.green, linestyle = hline.style_solid, editable = false)
hline(4, title = "4 line", color = color.yellow, linestyle = hline.style_solid, editable = false)
hline(6, title = "6 line", color = color.red, linestyle = hline.style_solid, editable = false)

//----------------------------------------------------------
// Plot histogram for Webby's RSI, ignoring negative values
//----------------------------------------------------------
plot(series = lowVs21DayMovingAverage > 0 ? abs(lowVs21DayMovingAverage) : na, 
     title = "Webby's RSI Histogram", 
     color = color.aqua, 
     linewidth = plotStyle == "Histogram" ? 2 : na, 
     style = plotStyle == "Histogram" ? plot.style_histogram : plotStyle == "Line" ? plot.style_line : plotStyle == "Area" ? plot.style_area : plot.style_columns,
     editable = false)

//----------------------------------------------------------
// Show moving average across the plot
//----------------------------------------------------------
plot(series = movingAverage > 0 ? movingAverage : na, 
     title = "Moving Average", 
     color = #C20690, 
     editable = true)

Webby’s RSI – Live in TradingView

You can find Webby’s RSI, and the Pine Script code, on my PlayTheTrade profile in the scripts area of TradingView.

The chart below is a live view of Webby’s RSI in TradingView.