DALEă!Here is the code for the CCI indicator. From Bill S. 2/13/01 ! With the version below you can vary the # of days. !!====================================================== n is 8. !change the "n" value above to any # of days you want. M is ([high] + [low] + [close]) / 3. avgm is simpleavg(M,n). absdiff is abs(M-avgm). sumD is sum(absdiff,n) * (1 / n). CCI is (M - avgm) / (0.015 * sumD). !!=======================================================  Rule Library˙˙ CCodeView‡