DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
XG1:MacD>0 AND REF(MACD,1)<0 AND REF(MACD,2)<0 AND REF(MACD,3)<0 AND REF(MACD,4)>0;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
XG1:MacD>0 AND REF(MACD,1)<0 AND REF(MACD,2)<0 AND REF(MACD,3)<0 AND REF(MACD,4)>0;