A1:=BARSLAST(REF(CROSS("MACD.DIF","macd.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
BC1:=DIF>0 AND DEA>0;
BC2:=BC1!=REF(BC1,1) AND B1;
BC3:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=1 AND CROSS(DIF,DEA) AND BC1;
BC4:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=2 AND CROSS(DIF,DEA) AND BC1;
BC5:=REF(DIF,BARSLAST(BC3))<=REF(DIF,BARSLAST(BC4));
零上二金:BC4 AND BC5;