MD:=DIF>DEA AND DIF<-0.5;{MACD的DIF大于DEA,并且DIF處于低位}
KJC:=CROSS(K,D);{KD金叉} T:=BARSLAST(REF(KJC,1));{獲得上次金叉的位置,為獲取上次金叉的收盤價(jià)和K值做準(zhǔn)備} BL:=REF(C,T+1)>C AND REF(K,T+1)<K AND KJC AND D<50 AND COUNT(CROSS(K,30),T+1)>=1; {收盤價(jià)與K值平替版背離,KD金叉,D值小于50,統(tǒng)計(jì)兩次金叉之間有至少一次K值上穿30}
A1:=C>=REF(HHV(H,3),1) AND (C/REF(C,1)-1)*100>2 AND C>O AND COUNT(BL AND MD,15)=1; {收盤價(jià)創(chuàng)三日新高,漲幅大于2%的陽線,最近15個(gè)周期中有一次KD背離并且DIF在DEA之上、DIF處于低位} XG:FILTER(A1,15);