lix

LX Rsi Divergence Bars

This script colours the bars when they are below or boyond a specified RSI threshold
Remove from Favorite Scripts Add to Favorite Scripts
study("LX Rsi Divergence Bars", shorttitle="LiX_RSIBARS", overlay=true)
//r = rising(ohlc4,6)
//rb = close + highestbars(close,6)
rsiperiod = input(title="RSI Period", type=integer, defval=21)
overb = input(title="Overbought", type=integer, defval=70)
oversold = input(title="Oversold", type=integer, defval=30)
rsbar = rsi(close,rsiperiod)
//clr = rsbar > 60 ? open < close ? 4 : na : na
//plot(clr,title="200 price",color=#3399FF,transp=90)
//bgcolor(close < open ? red : green, transp=70)
//barcolor(close < open ? silver : #3C78D8)
barcolor(rsbar >= overb ? open < close ? green : na : na) // moves in the trend of overbought
barcolor(rsbar >= overb ? open > close ? red : na : na) // diverging bar

barcolor(rsbar <= oversold ? open < close ? green : na : na) // diverging bar
barcolor(rsbar <= oversold ? open > close ? gray : na : na) // moves in the trend of oversold
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener 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 Billing Sign Out