QuantitativeExhaustion

[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..
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
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")