IldarAkhmetgaleev

Commodity channel index x2 v1

Slightly enhenced CCI. Take a look how difference between slow and fast CCI displayed as histogram can predict possible reverse.
EDIT: fast = 14, slow = 28 works better.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="Commodity Channel Index x2" , shorttitle='CCIx2')

fast_lenght = input(title="Fast CCI Length", type=integer, defval=6, minval=1)
slow_lenght = input(title="Slow CCI Length", type=integer, defval=14, minval=1)

source = close

fast_cci = cci(source, fast_lenght)
slow_cci = cci(source, slow_lenght)

hist = (fast_cci - slow_cci)
hist_color = hist > 0 ? green : red

hline(0, title="Zero Line", color=gray, linestyle=dotted)
overbought = hline(100, title="Positive Line", color=gray, linestyle=dotted)
oversold = hline(-100, title="Negative Line", color=gray, linestyle=dotted)
fill(overbought, oversold, color=#9915ff, transp=90)

plot(hist, color=hist_color, title='Difference', style=histogram)
fast_line = plot(fast_cci, color=#9922ff, title='Fast CCI')
slow_line = plot(slow_cci, color=#447711, title='Slow CCI')
fill(fast_line, slow_line, color=#004499, transp=90)