Webby RSI 2.0 For ThinkOrSwim

RDMercer

Member
Plus
Webby's RSI (Really Simple Indicator) 2.0 or version 5.150 as Mike himself calls it, builds upon the original Webby RSI by changing the way we measure extension from the 21-day exponential moving average.

Instead using the percentage of the low versus the 21-day exponential moving average, version 2 uses a multiple of the securities 50 day ATR (average true range) to determine the extension.

Version 2.0 also comes with some new additions, such as measuring the high vs 21-day exponential moving average when a security is below it, as well as an ATR extension from the 10-day simple moving average that Mike looks to as a guide to take partials.
CjTToGp.png


Here is an open source script of Webbys_RSI Ver 2, or version 5 as Webby calls it, for TradingView by AmphibianTrading.com. If possible could someone allot better at coding v me please turn this into a TOS study / indicator? Here's a link to the website mentioned:
https://www.tradingview.com/script/atuLQ8ZN-Webby-s-RSI-2-0/
Very Much Appreciated!!!
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Here is an open source script of Webbys_RSI Ver 2, or version 5 as Webby calls it, for TradingView by AmphibianTrading.com. If possible could someone allot better at coding v me please turn this into a TOS study / indicator? Here's a link to the website mentioned:

https://www.tradingview.com/script/atuLQ8ZN-Webby-s-RSI-2-0/

Very Much Appreciated!!!

Here is additional documentation and TV script:

Webby's RSI (Really Simple Indicator) 2.0 or version 5.150 as Mike himself calls it, builds upon the original Webby RSI by changing the way we measure extension from the 21-day exponential moving average.

Instead using the percentage of the low versus the 21-day exponential moving average, version 2 uses a multiple of the securities 50 day ATR (average true range) to determine the extension.

Version 2.0 also comes with some new additions, such as measuring the high vs 21-day exponential moving average when a security is below it, as well as an ATR extension from the 10-day simple moving average that Mike looks to as a guide to take partials.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Amphibiantrading

//@version=5
indicator("Webby RSI 2.0")

//constants
EMA21 = ta.ema(close,21)
SMA10 = ta.sma(close,10)

//inputs
atrLen = input.int(50, 'Atr Length')
osLevel = input.int(3, 'Stretched Level')
posCol = input.color(color.green, 'Above 21 Color')
negCol = input.color(color.red, 'Below 21 Color')
maCol = input.color(color.orange, 'Moving Average Extension Color')

//atr
atr = ta.atr(50)

// vs 21 & 10
lowV21 = low - EMA21
highV21 = EMA21 - high
highV10 = high - SMA10

//calculations
rsiPos = lowV21 / atr
rsiNeg = highV21 / atr
smaPos = highV10 / atr

//plots
plot(rsiPos > 0 ? rsiPos : na, 'ATR > 21', posCol, 2, plot.style_histogram)
plot(rsiNeg > 0 ? rsiNeg : na, 'ATR < 21', negCol, 2, plot.style_histogram)
hline(osLevel, 'Extended Level', color.red, hline.style_solid, 2)
plot(smaPos > 0 ? smaPos : na, 'SMA Extension', maCol, 2, plot.style_linebr)
check the below:

CSS:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © Amphibiantrading
#indicator("Webby RSI 2.0")
# Converted by Sam4Cok@Samer800    - 04/2024
Declare Zerobase;
Declare lower;


#//inputs
input fastMovgAvgType = AverageType.SIMPLE;
input fastMovAvgSrc = close;
input fasrMovAvgLength = 10;
input slowMovAvgType = AverageType.EXPONENTIAL;
input slowMovAvgSrc = close;
input slowMovAvgLength = 21;
input atrLength  = 50; #, 'Atr Length')
input StretchedLevel = 3; #, 'Stretched Level')

def na = Double.NaN;
def last = isNaN(Close);
#//constants
def EMA21 = MovingAverage(slowMovAvgType, slowMovAvgSrc, slowMovAvgLength);
def SMA10 = MovingAverage(fastMovgAvgType, fastMovAvgSrc, fasrMovAvgLength);

#//atr
def atr = atr(Length = atrLength);

#// vs 21 & 10
def lowV21  =   low - EMA21;
def highV21 =   EMA21 - high;
def highV10 =   high - SMA10;

#//calculations
def rsiPos = lowV21 / atr;
def rsiNeg = highV21 / atr;
def smaPos = highV10 / atr;

#//plots
plot smaExt = if smaPos > 0 then smaPos else na; # 'SMA Extension'
plot HistUp = if rsiPos > 0 then rsiPos else na; # 'ATR > 21'
plot HistDn = if rsiNeg > 0 then rsiNeg else na; # 'ATR < 21'
plot ExtLvl = if last then na else StretchedLevel;      # 'Extended Level'
smaExt.SetLineWeight(2);
smaExt.SetDefaultColor(Color.ORANGE);
HistUp.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
HistDn.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
HistUp.SetDefaultColor(Color.DARK_GREEN);
HistDn.SetDefaultColor(Color.DARK_RED);
ExtLvl.SetStyle(Curve.SHORT_DASH);
ExtLvl.SetDefaultColor(Color.DARK_ORANGE);


#-- END of CODE
 
check the below:

CSS:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © Amphibiantrading
#indicator("Webby RSI 2.0")
# Converted by Sam4Cok@Samer800    - 04/2024
Declare Zerobase;
Declare lower;


#//inputs
input fastMovgAvgType = AverageType.SIMPLE;
input fastMovAvgSrc = close;
input fasrMovAvgLength = 10;
input slowMovAvgType = AverageType.EXPONENTIAL;
input slowMovAvgSrc = close;
input slowMovAvgLength = 21;
input atrLength  = 50; #, 'Atr Length')
input StretchedLevel = 3; #, 'Stretched Level')

def na = Double.NaN;
def last = isNaN(Close);
#//constants
def EMA21 = MovingAverage(slowMovAvgType, slowMovAvgSrc, slowMovAvgLength);
def SMA10 = MovingAverage(fastMovgAvgType, fastMovAvgSrc, fasrMovAvgLength);

#//atr
def atr = atr(Length = atrLength);

#// vs 21 & 10
def lowV21  =   low - EMA21;
def highV21 =   EMA21 - high;
def highV10 =   high - SMA10;

#//calculations
def rsiPos = lowV21 / atr;
def rsiNeg = highV21 / atr;
def smaPos = highV10 / atr;

#//plots
plot smaExt = if smaPos > 0 then smaPos else na; # 'SMA Extension'
plot HistUp = if rsiPos > 0 then rsiPos else na; # 'ATR > 21'
plot HistDn = if rsiNeg > 0 then rsiNeg else na; # 'ATR < 21'
plot ExtLvl = if last then na else StretchedLevel;      # 'Extended Level'
smaExt.SetLineWeight(2);
smaExt.SetDefaultColor(Color.ORANGE);
HistUp.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
HistDn.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
HistUp.SetDefaultColor(Color.DARK_GREEN);
HistDn.SetDefaultColor(Color.DARK_RED);
ExtLvl.SetStyle(Curve.SHORT_DASH);
ExtLvl.SetDefaultColor(Color.DARK_ORANGE);


#-- END of CODE
Please forgive my criticism as I'm definitely not throwing rocks! However, the study plot seems off; specifically, the histogram study 'x' axis is not viewable? Here's a partial chart screenshot of NVO. Top is price plot; Center plot v Webbys_v2; lower study is a 4 year earlier version of Webbys_RSI. Lastly, attached is a screenshot of TradingView example; please note the histogram scale. Any way to fix the issue is of tremendous help.

Screen Shot 2024-04-24 at 10.59.21 PM.png
Screen Shot 2024-04-24 at 11.24.04 PM.png
 
Last edited by a moderator:
Please forgive my criticism as I'm definitely not throwing rocks! However, the study plot seems off; specifically, the histogram study 'x' axis is not viewable? Here's a partial chart screenshot of NVO. Top is price plot; Center plot v Webbys_v2; lower study is a 4 year earlier version of Webbys_RSI. Lastly, attached is a screenshot of TradingView example; please note the histogram scale. Any way to fix the issue is of tremendous help.

View attachment 21690View attachment 21691
Cyan color line in the center plot not part of the script. Not sure how appears in your chart. Copy the code again and paste then try. or share a screenshot of the indicator settings to get better understanding of the issue.
 
Cyan color line in the center plot not part of the script. Not sure how appears in your chart. Copy the code again and paste then try. or share a screenshot of the indicator settings to get better understanding of the issue.
In the study settings is an option to plot a data line. I had it turned on. All good now! Thx Agn.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
228 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top