TT:=IF((HHV(ABS(((HHV(CLOSE,6)/LLV(CLOSE,6))-1)),6)>(10/100)),3,6);
TT1:=IF((MINUTE=5),TT*48,IF((MINUTE=15),TT*16,IF((MINUTE=30),TT*8,IF((MINUTE=60),TT*4,TT))));
TT2:=IF(VOL=0,MA(CLOSE,TT1),((SUM(AMOUNT,TT1)/SUM(VOL,TT1))/100));
TT3:=MA(C,5)>REF(MA(C,5),1) AND REF(C>O OR C<O,69) AND H/C<1.02 AND REF(C>O OR C<O,158);
TT4:=REF(MA(C,5)<REF(MA(C,5),1),1) AND REF(C>O OR C<O,164) AND REF(C>O OR C<O,14);
TT5:=C>O AND REF(C>O,1) AND REF(C<O,2) AND REF(O/C>1.02,2) AND REF(O/C<1.08,46);
TT6:=IF(CROSS(CLOSE,REF(TT2,1)),REF(TT2,1),0);
TT7:=HHV((TT6>0),(BARSLAST(IF(CROSS(REF(TT2,1),CLOSE),REF(TT2,1),0)>0)+1));
TT8:=TT7>REF(TT7,1) AND CROSS(EMA(CLOSE,3),EMA(CLOSE,21));
TT3 AND TT4 AND TT5 AND TT8;