ChrisMoody

ENHANCED CCI INDICATOR!!! ENJOY!!!

COMEX:GC1!   GOLD FUTURES
1091 5 12
Let me know if you have any suggestions or requests?
Here is the Code:

//Created By User ChrisMoody
//Last Update 12-26-2013
study(title="CM_Enhanced_Commodity Channel Index", shorttitle="CM_Enhanced_CCI")
source = close, length = input(30, minval=1)
ma = sma(source, length)
cci = (source - ma) / (0.015 * dev(source, length))
ma2 = sma(cci, 1)
plot(cci, color=orange, style=area, linewidth=4, transp=50)
plot(ma2, title='Outer Line', color=white, style=line, linewidth=4, transp=0)

hline(0, title='Line 1', color=white, linestyle=solid, linewidth=2)
hline(-200, title='Line 2', color=green , linestyle=dashed, linewidth=4)
hline(200, title='Line 3', color=red, linestyle=dashed, linewidth=4)
// You may fill the background between any two hlines with a fill() function:
h1 = hline(100, title='Highlight Background 1', color=white, linestyle=dashed, linewidth=3)
h2 = hline(-100, title='Highlight Background 2', color=white, linestyle=dashed, linewidth=3)
fill(h1, h2, color=white, transp=70)
Reply
AlexandreFF
2 years ago
nice thanks bro i don't know if you saw it but when the cci comes from the bottom and is touching the 0 line the trend gets bearish, but when it comes from the top and touches the 0 line the trend gets bullish
Reply
ChrisMoody PRO AlexandreFF
2 years ago
Thanks for the comment...notice the improved code below. Your correct in your assessment...However, I only use the CCI for one particular setup I've found over the years has a 90% plus accuracy. With an additional Filter the accuracy goes up to the 95%+ Range. I'm trying to program that filter and I will post below.
Reply
Code is already updated. This version Fixes the Precision to automatically go to a 0 setting instead of Default, the 0 setting is the correct one for the CCI.

Updated Code:

//Created By User ChrisMoody
//Last Update 12-26-2013
//Full Credit Goes to www.ProTradingIndicators.com - They created this exact Enhanced Indicator and gave away for free on other platforms.
study(title="CM_Enhanced_Commodity Channel Index", shorttitle="CM_Enhanced_CCI", precision=0)
source = close, length = input(30, minval=1)
ma = sma(source, length)
cci = (source - ma) / (0.015 * dev(source, length))
ma2 = sma(cci, 1)
plot(cci, color=orange, style=area, linewidth=4, transp=50)
plot(ma2, title='Outer Line', color=white, style=line, linewidth=4, transp=0)

hline(0, title='Line 1', color=white, linestyle=solid, linewidth=2)
hline(-200, title='Line 2', color=green , linestyle=dashed, linewidth=4)
hline(200, title='Line 3', color=red, linestyle=dashed, linewidth=4)
// You may fill the background between any two hlines with a fill() function:
h1 = hline(100, title='Highlight Background 1', color=white, linestyle=dashed, linewidth=3)
h2 = hline(-100, title='Highlight Background 2', color=white, linestyle=dashed, linewidth=3)
fill(h1, h2, color=white, transp=75)
Reply
hello chris is there a setup u use with this
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out