EXP1:EMA(CLOSE,12);
EXP2:EMA(CLOSE,50);
A1:=MA(C,5);
A2:=MA(C,10);
A3:=crOSS(EXP1,EXP2);
A4:=CROSS(A1,A2);
A5:=COUNT(A4,4)=1;
A7:=A1>REF(A1,1) AND A2>REF(A2,1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
A8:=J>D AND J>K AND J>REF(J,1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2,COLORSTICK;
A9:=DIF>DEA AND MacD>0;
A6:=A3 AND A5 AND EXP1>EXP2 AND A7 AND A8 AND A9;
DRAWTEXT(A6,EXP1+0.01,'买入');