MA18:=MA(CLOSE,18);
mtm:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,7),7)/EMA(EMA(Abs(MTM),7),7);
买:=LLV(DX,3)=LLV(DX,8) AND COUNT(DX<0,2) AND crOSS(DX,MA(DX,2));
DRAWTEXT(FILTER(买=1,5),LOW*0.98,'★买'),colorred;
卖一:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖一=1,1),HIGH*1.02,'★卖'),colorgreen;