ConnersRSI with overbought and oversold lines
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title="WJA CRSI", shorttitle="WJA CRSI", overlay=false, precision=0)
rsilen = input(3, minval=1, title="RSI period")
streaklen = input(2, minval=1, title="Streak period")
lookback = input(100, title="ROC lookback")

rsi = rsi(close,rsilen)

upday = close > close[1] ? 1 : 0
downday = close < close[1] ? -1 : 0
upstreak = upday!=0 ? upstreak[1] + upday : 0
downstreak = downday!=0 ? downstreak[1] + downday : 0
streak = upstreak + downstreak

streakrsi = rsi(streak,streaklen)

roc = close/close[1] - 1
roccount = 0
for i=1 to lookback-1
    roccount := roc[i]<roc ? roccount + 1 : roccount

crsi = (rsi + streakrsi + roccount) / 3
rsiplot=plot(crsi, title="RSI", style=line, linewidth=1, color=blue)

band1 = hline(85, title="Upper Line", linestyle=dashed, linewidth=1, color=red)
band0 = hline(20, title="Lower Line", linestyle=dashed, linewidth=1, color=green)
fill(band1, band0, color=purple, transp=90)

Wjadevries PRO
5 months ago
ConnersRSI with overbought and oversold lines
Reply
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