DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
XG:CROSS(REF(MACD,1),0) AND MACD>REF(MACD,1);
(已测试通过)
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,9);
MACD:=(DIFF-DEA)*2;
XG:=REF(MACD,2)<0 AND REF(MACD,1)>0 AND MACD>REF(MACD,1);
DIFF := EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA := EMA(DIFF,M);
CROSS(DIFF,DEA);