Q7:=C-REF(C,1);
Q8:=100*EMA(EMA(Q7,6),6)/EMA(EMA(ABS(Q7),6),6);
RMA:=EMA(CLOSE,7);
NMA:=EMA(CLOSE,19);
A1:=L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1);
A2:=LLV(L,BARSLAST(CROSS(NMA,RMA))+1);
A3:=H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1);
A4:=HHV(H,BARSLAST(CROSS(RMA,NMA))+1);
A:=LINEVALUE(A1,A2,A3,A4,0,0);
B1:=H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1);
B2:=HHV(H,BARSLAST(CROSS(RMA,NMA))+1);
B3:=L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1);
B4:=LLV(L,BARSLAST(CROSS(NMA,RMA))+1);
B:=LINEVALUE(B1,B2,B3,B4,0,0);
X1:=LLV(Q8,2)=LLV(Q8,7);
X2:=COUNT(Q8<0,2);
X3:=CROSS(Q8,MA(Q8,2));
X4:=REF(B,1)
X5:=A>REF(B,1);
买进:X1 and X2 and X3 and X4 and X5;