N1:=6;N2:=12;N3:=26;
mtm:=C-REF(C,1);
DX:=100*Ema(EMA(MTM,N1),N1)/EMA(EMA(Abs(MTM),N1),N1),COLOR00FF00;
ZX:=100*EMA(EMA(MTM,N2),N2)/EMA(EMA(ABS(MTM),N2),N2),COLOR00FFFF;
CX:=100*EMA(EMA(MTM,N3),N3)/EMA(EMA(ABS(MTM),N3),N3),COLORFF00FF;
DXGD:=LLV(DX,2)=LLV(DX,5) AND crOSS(DX,MA(DX,2));
ZXGD:=LLV(ZX,2)=LLV(ZX,5) AND CROSS(ZX,MA(ZX,2)) AND DX>ZX;
中买:IF(ZXGD AND BETWEEN(DX,0,50) AND BETWEEN(CX,0,50),2,0),COLOR00FFFF;