DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DAT:=30;
Z:=BARSLASTCOUNT(MACD>0);
MACD1:=SUM(Z,DAT);
BUYHAOGU:MACD1>0 AND REF(MACD1=0,1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DAT:=30;
Z:=BARSLASTCOUNT(MACD>0);
MACD1:=SUM(Z,DAT);
BUYHAOGU:MACD1>0 AND REF(MACD1=0,1);