M1:=17;
EXP1:=EMA(CLOSE,M1);
升331:=REF(C,3)>REF(O,3) AND REF(C,2)<REF(O,2) AND REF(C,1)>REF(O,1) AND C>O AND C>REF(H,2);
升332:=REF(C,3)>REF(O,3) AND REF(C,2)>REF(O,2) AND REF(C,1)<REF(O,1) AND C>O AND C>REF(H,1);
降331:=REF(C,3)<REF(O,3) AND REF(C,2)<REF(O,2) AND REF(C,1)<REF(O,1) AND C>O AND C>REF(L,2);
STICKLINE((升331>0 OR 升332>0) AND EVERY(EXP1>REF(EXP1,1),10),0,10,2,0)COLORRED;
STICKLINE(降331>0 AND EVERY(EXP1<REF(EXP1,1),7),0,10,2,0)COLORGREEN;