ZT:=C/REF(C,1)>1.095;LB:=COUNT(ZT,5)>=3;LBJL:=BARSLAST(LB);DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);MACD:=(DIF-DEA)*2 ,COLORSTICK;DIFF:=DIF,COLOR33FF33;STICKLINE(DIF<0 AND DIF>DEA,0,MACD,1,0),COLOR0000FF;STICKLINE(DIF>0 AND DIF>DEA,0,MACD,1,0),COLORFF0000;STICKLINE(DIF>0 AND DIF>DEA AND DEA>0 AND DEA>MACD,0,MACD,1,0),COLOR00FF00;STICKLINE(DIF>0 AND DIF<DEA,0,MACD,1,0),COLORFF0080;STICKLINE(DIF<0 AND DIF<DEA,0,MACD,1,0),COLOR80FFFF;STICKLINE(DIF<0 AND DIF<DEA AND DEA<MACD,0,MACD,5,0),COLORC080FF;低位金叉:= CROSS(DIFF,DEA) AND DIFF<(-0.05);STICKLINE(低位金叉,0,-0.3,1,0),COLOR00FFFF;DRAWTEXT(低位金叉,-0.3,' 金一'),COLOR00FFFF;JCCOUNT:= COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:= CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;STICKLINE(二次金叉,0,-0.15,1,0),COLORFF00FF;DRAWICON(二次金叉,DEA*1.04,1),COLOR0000FF;DRAWTEXT(二次金叉,-0.15,' 金二'),COLORFF00FF;最近死叉距离:=BARSLAST(CROSS(DEA,DIF));最前死叉距离:=REF(BARSLAST(CROSS(DEA,DIF)),最近死叉距离+1)+最近死叉距离+1;最近金叉距离:=BARSLAST(CROSS(DIF,DEA));最前金叉距离:=REF(BARSLAST(CROSS(DIF,DEA)),最近金叉距离+1)+最近金叉距离+1;前L最低价格:=FINDLOW(L,最前金叉距离+1,最前死叉距离+1-最前金叉距离+1,1);近L最低价格:=LLV(L,最近死叉距离+1);PD:=近L最低价格<前L最低价格;底背离:=CROSS(DIF,DEA)AND LLV(DIF,最近死叉距离+1)>LLV(DIF,最前死叉距离+1)AND PDAND REF(DIF,最前死叉距离+1+最近死叉距离+1)>0;DRAWTEXT(底背离,-0.18,'底背离'),COLOR8000FF;启明星:=L>=REF(L,1) AND C>O AND H>=REF(H,1)AND REF(C,2)<=REF(C,3)AND REF(C,3)<=REF(C,4)AND COUNT(底背离,30)>=1;STICKLINE(启明星,0,-0.15,1,0),COLORFF00FF;DRAWICON(启明星,DEA*1.04,1),COLOR0000FF;DRAWTEXT(启明星,-0.16,'启明星'),COLORFF0080;EMA1:=EMA(C,20);EMA2:=EMA(C,170);EMA3:=EMA(C,250);EMA4:=EMA(C,5);JC:=CROSS(DIF,DEA);JCJL:=BARSLAST(JC);QYJCJL:=REF(BARSLAST(JC),JCJL+1);SC:=CROSS(DEA,DIF);SCJL:=BARSLAST(SC);DD:=LLV(L,SCJL);GD:=HHV(H,QYJCJL);XH:MACD>-0.05 AND MACD<0.02AND DD/GD<0.6AND LBJL<QYJCJLAND C>EMA2AND C>EMA3AND EMA2<EMA1AND EMA3<EMA1;