# Commodity Channel Index (CCI) Formula

You can easily see from the following formula for CCI, that this formula is considerably more complex than previous formulas.

## Formula

CCI = (M – Mov (n) M) / ((.015)(D))

D = (1/n) å from n to i-1 ½Mi – M ½

## Where

M = (1/3) (H + L + C)

Mov (n) M = the n-period simple moving average of M

H = the highest price for a period

L = the lowest price for a period

C = the closing price for a period

D = the mean deviation of the absolute value of the difference between the mean price and the simple moving average of mean prices

This is one of my favorite T/A’s, but I vary all the parameters.  I prefer periods (n) of 3 to 7 periods instead of the 20 periods usually used.

I also vary the crossing lines from –120 to +120 in steps of 2 or 5 and test with buying when the index crosses the minus line and holding until it crosses the positive line.

As you can see from the formula and my usage of this T/A, many variables can be adjusted to get the best back tested results.

An Analysis of Technical Analysis index