IldarAkhmetgaleev

Relative Strength Index x2

Two RSI better then one. Also histogram shows difference of fast and slow RSI .
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Relative Strength Index x2", shorttitle="RSIx2")
src = close
len_fast = input(14, minval=1, title="Length")
len_slow = input(28, minval=1, title="Length")

up_fast = rma(max(change(src), 0), len_fast)
down_fast = rma(-min(change(src), 0), len_fast)
rsi_fast = down_fast == 0 ? 100 : up_fast == 0 ? 0 : 100 - (100 / (1 + up_fast / down_fast))

up_slow = rma(max(change(src), 0), len_slow)
down_slow = rma(-min(change(src), 0), len_slow)
rsi_slow = down_slow == 0 ? 100 : up_slow == 0 ? 0 : 100 - (100 / (1 + up_slow / down_slow))

diff = rsi_fast - rsi_slow + 50
diff_color = diff > diff[1] ? green : red

plot(diff, color=diff_color, style=columns, histbase=50, transp=80)
plot(rsi_slow, color=gray)
plot(rsi_fast, color=purple)

band1 = hline(70)
band0 = hline(30)
fill(band1, band0, color=purple, transp=90)
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
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