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
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out