DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
TH1:=EVERY(DEA<0 AND DIF<0,40);
TH2:=COUNT(CROSS(DIF,DEA),60)>=3;
TH3:=CROSS(DIF,DEA);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
XG:TH1 AND TH2 AND TH3 AND 底背离;