N:=9;
M1:=2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M1,1);
J:=3*K-2*D;
XG:=crOSS(J,0);
DIF:=(EMA(CLOSE,15) - EMA(CLOSE,26));
DEA:=EMA(DIF,5);
macd:=2*(DIF-DEA);
XG2:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)<REF(MACD ,2) AND REF(MACD ,2)<REF(MACD ,3) AND REF(MACD ,3)<REF(MACD ,4);
箭在弦上:XG AND XG2;