ChrisMoody

CM_Enhanced CCI V2

Added 0 Line, + - 200 lines

Added a line that hi-lights the outside of the CCI

Updated 8/12/2014 by request for christian.david.75457

Added Ability To Plot 2nd CCI - !!!

Added ability to turn On/Off the +-200 lines.

Added Ability to Turn On/Off Show Area of CCI

Added Ability To Turn On/Off Show The Outer CCI Line

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//created by user ChrisMoody 2-2-2014
//Added 0 Line, +-200 lines, a line that hilights the outside of the CCI
//Updated 8/12/2014 by request for christian.david.75457
//Added Ability To Plot 2nd CCI
//Added ability to turn On/Off the +-200 lines.
//Added Ability to Turn On/Off Show Area of CCI and ability To Turn On/Off Show The Outer CCI Line
study(title="CM_Enhanced CCI V2", shorttitle="CM_Enhanced CCI V2", precision=0)
source = close
length = input(30, minval=1, title="Main CCI Length")
sol = input(true, title="Show Outer CCI Line")
shCCI2 = input(true, title="Show 2nd CCI?")
shHist = input(true, title="Show CCI Histogram?")
length2 = input(14, minval=1, title="2nd CCI Length")
sh200 = input(true, title="Show +200 and -200 Lines?")
//CCI 1
ma = sma(source, length)
cci = (source - ma) / (0.015 * dev(source, length))
maCCI1 = sma(cci, 1)
//CCI 2
ma2 = sma(source, length2)
cci2 = shCCI2 and (source - ma2) / (0.015 * dev(source, length2)) ? (source - ma2) / (0.015 * dev(source, length2)) : na
maCCI2 = shCCI2 and sma(cci2, 1) ? sma(cci2, 1) : na

plot(shHist and cci ? cci : na, title='CCI', color=green, style=areabr, linewidth=3, transp=20)
plot(sol and maCCI1 ? maCCI1 : na, title='OuterCCI Highlight', color=lime, style=line, linewidth=4)

plot(shHist and cci2 ? cci2 : na, title='CCI 2nd Line', color=red, style=columns, transp=60)
plot(sol and maCCI2 ? maCCI2 : na, title='OuterCCI Highlight 2nd Line', color=red, style=line, linewidth=3)

band1 = hline(100, title='100 Line',color=white, linestyle=dashed, linewidth=3)
band0 = hline(-100, title='-100 Line', color=white, linestyle=dashed, linewidth=3)
fill(band1, band0, color=white, transp=70)

plot(sh200 and 200 ? 200 : na, title="200 Line",color=red, style=line, linewidth=3)
plot(sh200 and -200 ? -200 : na, title='-200 Line', color=lime, style=line, linewidth=3)
hline(0, title='0 Line', color=white, linestyle=solid, linewidth=2)