MID:=12;
DIF:EMA(DCLOSE,7)-EMA(DCLOSE,19);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
MACD差:MACD-REF(MACD,1);
买入:=CROSS(((-EMA(DIF,9))*10-REF((DIF-EMA(DIF,9))*10,1)),1)
AND (DIF-EMA(DIF,9))*10>1;
金龙有喜:MACD差>0.15;
MACD上拐:=CROSS(MACD,REF(MACD,1));
AAA:MACD差>0.15 AND CROSS(MACD,REF(MACD,1));