R1:=(CLOSE-MA(CLOSE,60))/MA(CLOSE,60)*100;R2:=COUNT(MA(CLOSE,60)>REF(MA(CLOSE,60),1),100)>95;R3:=COUNT(R1<20>95;R4:=COUNT(CLOSE>MA(CLOSE,60),100)>80;R5:=CLOSE/REF(CLOSE,1)>1.04;R6:=/CAPITAL*100>2.8;R7:=R2 AND R3 AND R4 AND R5 AND R6;XG:=REF(C,1)
[O AND C>REF(H,1); R7 AND (REF(BARSLAST(R7),1)>20 OR BARSSINCE(R7)=0) AND XG;
]