20813

Multi Timeframe RSI

Improved Version of with lines on 30 and 70 (both changeable).
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study("Multi Timeframe RSI", shorttitle="MTF_RSI")
len = input(14, title="Length", type=integer)
src = input(close, title="Source", type=source)
line1 = input(70, title="Line 1", type=integer, minval=0, maxval=100)
line2 = input(30, title="Line 2", type=integer, minval=0, maxval=100)
show5m = input(true, title="show 5m", type=bool)
show15m = input(true, title="show 15m", type=bool)
show30m = input(true, title="show 30m", type=bool)
show1h = input(true, title="show 1h", type=bool)
show2h = input(true, title="show 2h", type=bool)
show4h = input(true, title="show 4h", type=bool)
show1D = input(true, title="show 1D", type=bool)

rsiCurrent = rsi(src,len)
rsi5m = security(ticker,"5",rsi(src,len))
rsi15m = security(ticker,"15",rsi(src,len))
rsi30m = security(ticker,"30",rsi(src,len))
rsi1h = security(ticker,"60",rsi(src,len))
rsi2h = security(ticker,"120",rsi(src,len))
rsi4h = security(ticker,"240",rsi(src,len))
rsi1D = security(ticker,"D",rsi(src,len))

plot(rsiCurrent, color=red, title="RSI current")

plot(show5m ? rsi5m : na, color=interval < 5 and not isdaily and not isweekly and not ismonthly  ? #aaaaaa : na, title="RSI 5m")
plot(show15m ? rsi15m : na, color=interval < 15 and not isdaily and not isweekly and not ismonthly  ? #999999 : na, title="RSI 15m")
plot(show30m ? rsi30m : na, color=interval < 30 and not isdaily and not isweekly and not ismonthly  ? #888888 : na, title="RSI 30m")
plot(show1h ? rsi1h : na, color=interval < 60 and not isdaily and not isweekly and not ismonthly  ? #777777 : na, title="RSI 1h")
plot(show2h ? rsi2h : na, color=interval < 120 and not isdaily and not isweekly and not ismonthly  ? #666666 : na, title="RSI 2h")
plot(show4h ? rsi4h : na, color=interval < 240 and not isdaily and not isweekly and not ismonthly ? #555555 : na, title="RSI 4h")
plot(show1D ? rsi1D : na, color=not isdaily and not isweekly and not ismonthly ? #444444 : na, title="RSI 1D")
plot(line1, color=gray,title="Line 1")
plot(line2, color=gray,title="Line 2")