MACD选股-通达信副图选股
MA5:=MA(C,5);
MA10:=MA(C,10);
MA15:=MA(C,15);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA40:=MA(C,40);
MA60:=MA(C,60);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
上影线:=(H-MAX(C,O))/(MAX(C,O)-MIN(C,O));
下影线:=(MAX(C,O)-L)/(MAX(C,O)-MIN(C,O));
水上金叉:=REF(MACD,3)=LLV(MACD,10) AND REF(MACD 0,3) AND EVERY(MACD REF(MACD,1),2) AND CROSS(DIF,DEA) AND BETWEEN(HHV(MACD,28)/ABS(LLV(MACD,7)),0.5,1.8) AND
EVERY(DEA =0,50) AND NOT(REF((O MA20 AND C MA5),2)) AND NOT(O=L) AND NOT(REF(O=L,2)) AND NOT(O MA5 AND L =MA5) AND NOT(REF(H=MA5,3)) AND REF(下影线 5.24,3)
AND NOT(REF(C=L,3)) AND V REF(V,1)*1.51 AND NOT(C O) AND NOT(REF(CROSS(MA15,MA10),2)) AND NOT(REF(L MA5 AND O MA10 AND O C,1)) AND NOT(REF(CROSS(MA10,MA5),2));
水下金叉:=REF(MACD,3)=LLV(MACD,11) AND REF(MACD 0,3) AND EVERY(MACD REF(MACD,1),2) AND CROSS(DIF,DEA) AND EVERY(DEA 0,14) AND BETWEEN(V,MA(V,10)*0.662,MA(V,10)*0.75)
AND BETWEEN(HHV(MACD,28)/ABS(LLV(MACD,7)),0.8,1.9) AND NOT(CROSS(MA15,MA20)) AND NOT(C=O) AND NOT(REF(CROSS(MA20,MA10),3)) AND NOT(CROSS(MA20,MA10)) AND
NOT(H MA10 AND CROSS(C,MA10)) AND NOT(H MA20 AND L MA5) AND NOT(REF(H MA20 AND L MA5,1)) AND NOT(REF(CROSS(MA20,MA10),2)) AND 下影线 15.99 AND
NOT(REF(CROSS(MA15,MA10),1)) AND NOT(O=L) AND REF(下影线 8.24,2) AND NOT(REF(L MA5 AND CROSS(C,MA10),1)) AND REF(下影线 5.99,1);
金叉:=水上金叉 OR 水下金叉;
底0:=BETWEEN(LLV(MACD,30),-0.0002,-0.6) AND REF(CROSS(DIF,DEA) AND BETWEEN(V,MA(V,10)*0.35,MA(V,10)*0.75) ,3) AND CROSS(MA5,MA10) AND BETWEEN(V,REF(V,1)*0.6,REF(V,1)*1.2)
AND NOT(O MA30 AND C MA30 AND C MA20) AND NOT(L MA5 AND L MA30 AND C MA5) AND NOT(CROSS(MA15,MA30)) AND NOT(CROSS(MA20,MA30)) AND C O AND 下影线 3.27
AND 上影线 7.74 AND NOT(H MA20 AND O MA15 AND MA20 MA15) AND NOT(CROSS(MA5,MA30) AND CROSS(MA5,MA20) AND CROSS(MA5,MA15)) AND NOT(C MA40 AND L MA30 AND MA40 MA30)
AND NOT(REF(CROSS(MA10,MA5) AND C MA60 AND L MA60,4)) AND NOT(CROSS(MA5,MA30)) AND NOT(CROSS(MA20,MA40)) AND NOT(REF(V REF(V,1)*2.22,1)) AND NOT(REF(C=O,3))
AND NOT(REF(CROSS(MA5,MA15),1)) ;
底:=底0 AND NOT(REF(CROSS(MA20,MA10),3)) AND NOT(REF(CROSS(MA10,MA5),3)) AND NOT(REF(O MA10 AND L MA5 AND MA10 MA5 AND C O,2))
AND NOT(REF(H MA20 AND O MA15,1)) AND REF(下影线 22.99,1) AND NOT(REF(CROSS(C,MA10) AND CROSS(C,MA15),1)) AND REF(上影线 35.99,2);
XG:金叉 OR 底;