MarcoValente

Relative Strength & sma delta

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.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//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)