CooperHoang

CCI trend and extreme indicator

115
This employ multi time frame analysis to give a good visual of where is the market is at.

green = general market is trending up from the confluence of 3 different time frame
red = general market is trending down from the confluence of 3 different time frame
Bright green = overbought and trend is likely to reverse
Bright red = oversold and trend is likely to reverse
สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study(title="Commodity Channel Index", shorttitle="CCI Momentum")
length = input(20, minval=1)
src = input(close, title="Source")
ma = sma(src, length)
length1 = input(60, minval=1)
ma1 = sma(src, length1)
length2 = input(240, minval=1)
ma2 = sma(src, length2)

cci = (src - ma) / (0.015 * dev(src, length))
cci1 = (src - ma1) / (0.015 * dev(src, length1))
cci2 = (src - ma2) / (0.015 * dev(src, length2))
data = cci > 0 and cci1 > 0 and cci2 > 0
data1 = cci < 0 and cci1 < 0 and cci2 < 0

bgUp    = (data) ? green : na
bgDown  = (data1) ? red : na
bgUp1    = (cci > 200 and cci1 > 200 and cci2 >200) ? green : na
bgDown1    = (cci < -200 and cci1 < -200 and cci2 < -200) ? red : na
bgcolor(bgUp, transp=60)
bgcolor(bgDown, transp=60)
bgcolor(bgUp1, transp=0)
bgcolor(bgDown1, transp=0)