Triple CCI

CCI with three periods plotted on the same indicator. The turbo is the green line, the long time frame is the white line and the standard CCI is red with the histogram. The main CCI will turn yellow if the reading crosses the 200 value.  

Triple CCI

Triple CCI

# TRIPLECCI
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 17 Jan 2009

declare lower;

input length = 50;
input LongLength = 100;
input turboLength = 14;

DEF CCI50 = CCI(length = length, over_bought = 100, over_sold = -100);
DEF CCI100 = CCI(length = longlength, over_bought = 100, over_sold = -100);
DEF CCI14 = CCI(length = turboLength, over_bought = 100, over_sold = -100);
DEF CCILineColor = if(AbsValue(CCI50) > 200, 8, 5);

plot Long = CCI100;
Long.SetDefaultColor(color.white);

plot CCI = CCI50;
CCI.SetPaintingStrategy(paintingStrategy.HISTOGRAM);
CCI.SetDefaultColor(color.red);

plot Turbo = CCI14;
turbo.SetDefaultColor(color.green);

plot Plus100 = 100;
Plus100.SetDefaultColor(color.green);

plot Minus100 = -100;
Minus100.SetDefaultColor(color.green);

plot Zero = 0;
Zero.SetDefaultColor(color.green);

plot CCILine = CCI50;
CCILine.AssignValueColor(GetColor(CCILineColor));
CCILine.SetLineWeight(2);
This entry was posted in Indicator and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>