@@ -0,0 +1,676 @@
+package com.jasonlam604.stocktechnicals.indicators;%0A%0Apublic class CommodityChannelIndex %7B%0A%0A%09public double execute(double%5B%5D high,double%5B%5D low,double%5B%5D close,int range) throws Exception %7B%0A%09%09%0A%09%09TypicalPrice typicalPrice = new TypicalPrice();%0A%09%09double%5B%5D tp = typicalPrice.executeSet(high,low,close);%0A%09%09%0A%09%09SimpleMovingAverage simpleMovingAverage = new SimpleMovingAverage();%0A%09%09double%5B%5D sma = simpleMovingAverage.execute(tp, range);%0A%09%09%0A%09%09double cci = 0;%0A%09%09%0A%09%0A%09%09for (int i= range-1; i%3Cclose.length; i++) %7B%0A%09%09%09%0A%09%09%09double sum = 0;%0A%09%09%09double mean_deviation = 0;%0A%09%09%09%0A%09%09%09for (int j = i - range + 1; j %3C i+1; j++)%7B%0A%09%09%09%09sum += Math.abs(tp%5Bj%5D-sma%5Bi%5D);    %0A%09%09%09%7D%0A%0A%09%09%7D%0A%09%09%0A%09%09return cci; %0A%09%7D%0A%09%0A%7D%0A

Work in progress CCI