Next: , Previous: , Up: Indicators   [Index]


10.9 Commodity Channel Index

The Commodity Channel Index by Donald Lambert is an oscillator designed to identify overbought and oversold conditions in a ranging market. It expresses the difference between today’s typical price and recent average as a fraction of each day’s mean deviation from that average.

      tp[today] - mean tp
CCI = -------------------
        0.015 * meandev

The mean tp is over a given past N days. “Typical price” is the average of high, low and close. Chart uses just the close if there’s no high/low data from a particular data source.

     high + low + close
tp = ------------------
             3

The mean deviation meandev is the mean difference between each of the N days typical price and the mean tp. The differences are taken as absolute values (ie. ignoring negative signs),

          abs(tp1 - mean tp) + abs(tp2 - mean tp) + ... abs(tpN - mean tp)
meandev = ----------------------------------------------------------------
                                       N

The scaling factor 0.015 above is designed to put the index between +100 and -100 roughly 70% to 80% of the time. Those levels are drawn as dashed lines. Lambert regarded index values outside that range as overbought or oversold, but with no actual buy or sell signal until crossed back, ie. rising above +100 then coming back below that, or conversely falling below -100 then rising back above it again.

The default N-day period in Chart is 20 days. Lambert recommended making it about 1/3 of the market cycle, so 20 days would correspond to a 60 day cycle.

The meandev calculated is similar to the standard deviation (see Standard Deviation) in that it’s an average difference from the mean, but meandev is a mean of the absolute differences, whereas stddev is a quadratic mean of those differences.


Next: , Previous: , Up: Indicators   [Index]


Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.