N:=99;
M:=21;
X:=9;
VARA:ema((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,M);
VARB:ema(VARA,X);
TYP:=(HIGH+LOW+CLOSE)/3;
cci:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
XG:crOSS(CCI,10) AND COUNT((C/REF(C,1)-1)*100>5,10)<4 AND C>O AND vol>REF(VOL,1);
STICKLINE(CROSS(VARA,VARB) AND VARB>REF(VARB,1) AND COUNT((C/REF(C,1)-1)*100>5,4)<3,0,50,2,0),COLORYELLOW;
STICKLINE(XG AND CROSS(VARA,VARB) AND VARB>REF(VARB,1) AND VARB<50 AND COUNT((C/REF(C,1)-1)*100>5,4)<3,0,100,2,0),COLORRED;