Relative Strength & sma delta

807 2
2 RSI with different length at your choise, with 2 sma signal. 4 Plots show the difference between the 2 RSI and 2 Signals , the difference of the 2 RSI and the difference of the Delta of the 2 RSI . So you can have a close view toghether with a bird s eye view. The black line is the middle way.
```//version@2
study(title="Relative Strength Index diff", shorttitle="DIF RSI")
src = close, len = input(21, minval=1, title="Length RSI 1")
sig=input(6,"signal RSI len")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
sr=rsi-sma(rsi,sig)
plot(sr,title="Rsi-sig=Delta1", color=sr>0?green:red,style=area,linewidth=2,transp=50)
band0 = hline(0)
lenq = input(11, minval=1, title="Length RSI 2")
upq = rma(max(change(src), 0), lenq)
downq = rma(-min(change(src), 0), lenq)
rsiq = downq == 0 ? 100 : upq == 0 ? 0 : 100 - (100 / (1 + upq / downq))
srq=rsiq-sma(rsiq,sig)
dq=sma((srq-sr),6)
plot(dq,title="delta1 - delta2", color=black,transp=0)
plot(srq,title="Rsi2 - sig=Delta2",color=blue)
dif=linreg((rsiq-rsi),4,0)
plot(dif,title="Rsi1-Rsi2",style=area,color=dif>0?lime:red,linewidth=2,transp=70)
```
How do you get the vertical red and green lines on chart and indicator?
dave.seremek
the vertical line it is not part of the indicator, I just posted on the chart to see clearly the inversion point, just normal line on the left side of the screen.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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