[RS][JR]RSI Price Bands

RSI Price Bands
By Ricardo Santos and JR

Have you ever wondered what RSI would look like as a Band? Well here it is. First premier Trading View special, RSI Price Band. Red shows overbought and Green shows oversold. You can also adjust what levels you prefer for overbought and oversold, and what additional RSI lengths you would like to see displayed on the chart..
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS][JR]RSI Price Bands", overlay=true)

//  ||--------------------------------------------------------------------------------------------------------------------------||
//  ||---   INPUTS:     --------------------------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------------------------------------------||
src = input(defval=hlc3, type=source, title="Source Series to be Used:")

showRSI1 = input(defval=true, type=bool, title="Show RSI Line 1?")
showRSI2 = input(defval=true, type=bool, title="Show RSI Line 2?")
showRSI3 = input(defval=true, type=bool, title="Show RSI Line 3?")

baseMA_length = input(defval=100, type=integer, minval=1, title="Bands Smoothness Period Length:")

fast_rsi_length = input(defval=7, type=integer, minval=1, title="Fast RSI Period Length:")
fast_smooth_length = input(defval=1, type=integer, minval=1, title="Fast RSI Smoothness Length:")
medium_rsi_length = input(defval=21, type=integer, minval=1, title="Medium RSI Period Length:")
medium_smooth_length = input(defval=1, type=integer, minval=1, title="Medium RSI Smoothness Length:")
slow_rsi_length = input(defval=50, type=integer, minval=1, title="Slow RSI Period Length:")
slow_smooth_length = input(defval=1, type=integer, minval=1, title="Slow RSI Smoothness Length:")

deviation_length = input(defval=2, type=integer, minval=1, title="Bands Tightness Period Length:")

showOBSFill = input(defval=true, type=bool, title="Show Over Bought/Sold Bands?")

//  ||--------------------------------------------------------------------------------------------------------------------------||
hh = highest(baseMA_length)
ll = lowest(baseMA_length)
//  ||--------------------------------------------------------------------------------------------------------------------------||
//  ||---   RSI to Price level conversion:     ---------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------------------------------------------||

baseMA = ema(avg(hh,ll), 10)//ema(src, baseMA_length)

capdev = cum(stdev(src, deviation_length)) / (n+1)

fastRSI = not showRSI1 ? na : ema(rsi(src, fast_rsi_length), fast_smooth_length)
mediumRSI = not showRSI2 ? na : ema(rsi(src, medium_rsi_length), medium_smooth_length)
slowRSI = not showRSI3 ? na : ema(rsi(src, slow_rsi_length), slow_smooth_length)

fastRSILine = not showRSI1 ? na : baseMA - (capdev*(50-fastRSI))
mediumRSILine = not showRSI2 ? na : baseMA - (capdev*(50-mediumRSI))
slowRSILine = not showRSI3 ? na : baseMA - (capdev*(50-slowRSI))

bl = plot(baseMA, color=black, title="Middle Line / RSI.50")

plot(not showRSI1 ? na : fastRSILine, color=blue, title="Fast RSI")
plot(not showRSI2 ? na : mediumRSILine, color=gray, title="Medium RSI")
plot(not showRSI3 ? na : slowRSILine, color=teal, title="Slow RSI")

//  ||--------------------------------------------------------------------------------------------------------------------------||
//  ||---   Over Bought/Sold Bands:     ----------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------------------------------------------||

OBLine = baseMA + (capdev*input(20))
OSLine = baseMA - (capdev*input(20))

ob1 = plot(not showOBSFill ? na : OBLine, color=black, style=circles, title="Over Bought Line")
os1 = plot(not showOBSFill ? na : OSLine, color=black, style=circles, title="Over Sold Line")

ob2 = plot(not showOBSFill ? na : baseMA + (capdev*50), color=black, style=circles, title="RSI.100 Line")
os2 = plot(not showOBSFill ? na : baseMA - (capdev*50), color=black, style=circles, title="RSI.0 Line")

fill(ob1, ob2, color=maroon, transp=90, title="Over Bought Fill")
fill(os1, os2, color=green, transp=90, title="Over Sold Fill")
When I load the script, I don't get those bands..... I only see the central lines.
+2 Reply
Try using the "make it mine" function. Right below the thumbs up.
+5 Reply
pcmourao QuantitativeExhaustion
I added the script to my favorites list but I just can't seem to get the red and green shadows on the overbought and oversold levels... I can only get the central RSI lengths.
+2 Reply
I see what your saying, not sure why you're having trouble with RSI Price Channel.
+5 Reply

Worked fine when I transferred onto a blank chart/no script.
+5 Reply
pcmourao QuantitativeExhaustion
got it figured out....it was the shading that was too light. I'm on a black chart. Nice
+2 Reply

34 RSI smoothness works very well
JR , very good !
+1 Reply

Great Script!
+1 Reply
really good, it helps a lot to get a BIG picture of my forex pairs, thank you
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out