jkswoods

JKSW Relative Strength Index

Better than the default RSI...
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="JKSW Relative Strength Index", shorttitle="JKSW RSI")

// Plot the RSI 
src = close
len = 50
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
plot(rsi, color=red, title="RSI value")

// Overbought lines...
hline(60, "Moderately overbought", orange)
overbought = hline(65, "Overbought", orange)
hline(70, "Extremely overbought", red)

// Oversold lines...
hline(40, "Moderately oversold", lime)
oversold = hline(35,"Oversold", lime)
hline(30, "Extemely oversold", green)

// Mid line
hline(50, "Mid line", black, dotted)

// Fill the overbought and oversold hlines
fill(overbought, oversold, color=green, transp=95, title="RSI area")