VAR1:=14;
VAR2:=60;
VAR3:=(HIGH+LOW+CLOSE)/3;
CCI1:(VAR3-ma(VAR3,VAR1))/(0.015*AVEDEV(VAR3,VAR1)),COLORRED,LINETHICK2;
CCI2:MA(CCI,2),COLORRED;
CCI3:MA(CCI,3),COLORRED;
CCI4:MA(CCI,4),COLORRED;
CCI5:MA(CCI,5),COLORRED;
CCI6:MA(CCI,6),COLORRED;
CCI7:MA(CCI,7),COLORRED;
CCI8:MA(CCI,8),COLORRED;
CCI9:MA(CCI,9),COLORRED;
CCI10:MA(CCI,10),COLORRED;
CCI11:MA(CCI,11),COLORRED;
强势区:100,POINTDOT,COLOR009F00;
弱势区:(-100),POINTDOT,COLORLIMAGENTA;
多空:0,POINTDOT,COLORRED;
IF(CCI1>100,CCI1,DRAWNULL),COLORWHITE,LINETHICK2;
IF(CCI1<(-100),CCI1,DRAWNULL),COLOR00CC66;
IF(CCI2>100,CCI2,DRAWNULL),COLORWHITE;
IF(CCI2<(-100),CCI2,DRAWNULL),COLOR00CC66;
IF(CCI3>100,CCI3,DRAWNULL),COLORWHITE;
IF(CCI3<(-100),CCI3,DRAWNULL),COLOR00CC66;
IF(CCI4>100,CCI4,DRAWNULL),COLORWHITE;
IF(CCI4<(-100),CCI4,DRAWNULL),COLOR00CC66;
DRAWICON(CCI>(-100) AND CCI2<(-80),CCI1,29);
VAR4:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR5:=SMA(SMA(VAR4,3,1),3,1)/28.57;
VAR6:=ema(VAR5,5);
VAR7:=3*VAR5-2*VAR6;
VAR8:=crOSS(VAR7,VAR5) AND VAR5<2.1 AND CLOSE>OPEN;
DRAWICON(VAR8,0,30);