DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
X1:=MACD>0;{MACD在0轴上方}
X2:=MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,20) AND MA(C,5)>REF(MA(C,5),1) AND MA(C,10)>REF(MA(C,10),1) AND MA(C,20)>REF(MA(C,20),1);{均线多头向上}
X3:=L<=MA(C,20) AND C>MA(C,20); {股价回调在20日均线附近}
XG:X1 AND X2 AND X3;