MTR:=MAX(MAX((H-L),Abs(REF(C,1)-H)),ABS(REF(C,1)-L));
ATR:=MA(MTR,14);
boll:=MA(C,20);
UB:=BOLL+2*STD(C,20);
LB:=BOLL-2*STD(C,20);
HH:=HHV(H,30);
LL:=LLV(L,30);
LC:=(C-LL)/(HH-LL)<0.4;
SK:=UB-BOLL<ATR;
KX:=C/REF(C,1)>1.01 AND C>MA(C,10) AND vol>MA(VOL,5);
A1:=KX AND LC AND BARSLAST(SK)<5;
XG:FILTER(A1,20);