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

Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?
//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)