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)