N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
IF(CCI>=REF(CCI,1),CCI,DRAWNULL),COLORRED,LINETHICK2;
IF(CCI