Piyu-sanj

RSI +ADX Martket Trend

Piyu-sanj ที่อัปเดต:   
Hi Please find the useful trend direction indicator
เอกสารเผยแพร่:
//@version=4
study(title="RSI Market", shorttitle="RSI", format=format.price, precision=2)
src = close, len = input(14, minval=1, title="Length"), th = input(20),
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))
plot(rsi, color=#000000, title="RSI", transp=0, linewidth=1)
rv = rsi
ob = input(title="Overbought", type=input.integer, defval = 70)
us = input(title="Undersold", type=input.integer, defval = 30)
h1 = hline(ob, color=#b2b5be, linestyle=hline.style_dashed, title="Overbought")
h2 = hline(50, color=#b2b5be, linestyle=hline.style_dashed, title="middle")
h3 = hline(us, color=#b2b5be, linestyle=hline.style_dashed, title="Undersold")
ref = plot(50, editable=false, title="Overbought")
oblv = plot(rv>50? rv : 50, transp=100, editable=false, title="Uptrend", display=display.none)
obld = plot(rv>50? 50 : rv, transp=100, editable=false, title="Downtrend", display=display.none)
fill(oblv,ref, color=color.green, transp=50, title="Up trend")
fill(obld,ref, color=color.red, transp=50, title="Down trend")

switch=input(true, title="Show consolidation areas? (The color changes there each bar)")
ShowConsolidation = 2

GetBgColor = iff( (hl2 > hl2) and (hlc3 > hlc3) and (close > close) and (hl2 > hl2) and (hlc3 > hlc3) and (close > close), 1,
iff( (hl2 < hl2) and (hlc3 < hlc3) and (close < close) and (hl2 < hl2) and (hlc3 < hlc3) and (close < close), -1, nz(GetBgColor, 0) ))

SelectBgColor = GetBgColor == -1 ? red: GetBgColor == 1 ? green: na

bgcolor(SelectBgColor, transp = 85)
สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?