N:=5;
mtm:=C-REF(C,1);
DX1:=100*EMA(EMA(MTM,N),N)/EMA(EMA(Abs(MTM),N),N);
买1:IF(LLV(DX1,2)=LLV(DX1,7) AND COUNT(DX1<0,2) AND crOSS(DX1,MA(DX1,2)),1,0);
N:=5;
mtm:=C-REF(C,1);
DX1:=100*EMA(EMA(MTM,N),N)/EMA(EMA(Abs(MTM),N),N);
买1:IF(LLV(DX1,2)=LLV(DX1,7) AND COUNT(DX1<0,2) AND crOSS(DX1,MA(DX1,2)),1,0);