SHORT:=12;LONG:=26;MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORYELLOW ;
DEA:=EMA(DIF,MID),COLORFF9900 ;
macd:=(DIF-DEA)*2;
低位金叉:=crOSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BArslAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A11+1)>CLOSE AND DIF>REF(DIF,A11+1) AND CROSS(DIF,DEA);
三全项:低位金叉 AND 二次金叉 AND 底背离;