A7:=C-REF(C,1);
A8:=100*Ema(ema(A7,5),5)/EMA(EMA(Abs(A7),5),5);
SHORT:=3; LONG:=10;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
上升:=DRAWLINE(L=LLV(L,BArslAST(crOSS(NMA,RMA))+1)
,LLV(L,BARSLAST(CROSS(NMA,RMA))+1),
H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
下降:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),
HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1)
,LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
买进:(LLV(A8,5)=LLV(A8,7) AND COUNT(A8<0,5) AND
CROSS(A8,MA(A8,5))) AND REF(下降,1)<REF(下降,2) AND 上升>REF(下降,1);