一、黏合:
1、MACD零轴上黏
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DIF>0 AND ABS(MACD)<0.01;
2、MACD零轴黏合
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
BETWEEN(DIF,-0.01,0.01) AND BETWEEN(DEA,-0.01,0.01) AND ABS(MACD)<0.01;
3、MACD零轴下黏
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DIF<0 AND ABS(MACD)<0.01;
二、 金叉
1、MACD金叉
MACD.DEA>0 AND (CROSS(MACD.DIF,MACD.DEA));
2、MACD零轴附近金叉
ABS(MACD.MACD)>0.1 AND MACD.DEA>0 AND (CROSS(MACD.DIF,MACD.DEA) );
3、MACD即将金叉
MACD.DIFREF(MACD.DIF,1) AND MACD.DEA>0 ;
4、MACD二次金叉
BARSLAST(CROSS(MACD.DIF,MACD.DEA))>=2
AND MACD.DIF>REF(MACD.DIF,1) AND MACD.DEA>REF(MACD.DEA,1);
5、MACD5日内二次金叉
AA:=CROSS(MACD.DEA,MACD.DIF);
BB:=BARSLAST(AA);
CROSS(MACD.DIF,MACD.DEA) AND BB>=3 AND BB<5;