{底部擒牛副图--}
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:(DIFF-DEA)*2,COLORSTICK;
HGW1:=MACD<0 AND MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
STICKLINE(HGW1,0,MACD,0.3,0),COLORYELLOW;
HGW2:=MACD>0 AND MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3) AND REF(MACD,3)>REF(MACD,4);
HGW3:=DEA-DIFF;
HGW4:=IF(MACD<0,SUM(MACD,BARSLAST(HGW3<0)),0);
HGW5:=LLV(LOW,BARSLAST(HGW3<0));
HGW6:=HHV(HIGH,BARSLAST(HGW3>0));
HGW7:=IF(MACD<0,BARSLAST(CROSS(DIFF,DEA)),0);
HGW8:=REF(HGW4,HGW7+1);
HGW9:=REF(HGW5,HGW7+1);
HGW10:=IF(HGW4<0 AND ABS(HGW4)<ABS(HGW8),1,0);
HGW11:=MACD<0 AND REF(MACD,1)<0 AND CLOSE<HGW9 AND ABS(HGW4)<ABS(HGW8) AND ABS(MACD)<ABS(REF(MACD,1));
HGW12:=IF(CROSS(DIFF,DEA),REF(HGW10,1),0);
HGW13:=IF(DIFF>REF(DIFF,1),REF(HGW10,1),0) AND DIFF<0 AND DEA<0;
HGW14:=BARSLAST(REF(CROSS(DIFF,DEA),1))*1;
HGW15:=REF(CLOSE,HGW14+1)>CLOSE AND DIFF>REF(DIFF,HGW14+1) AND CROSS(DIFF,DEA)*1;
DRAWLINE(HGW14=0,DEA-0.02,HGW15,DEA-0.02,0)*1,DOTLINE,COLORRED;
牛启动:=FILTER(HGW13,10);
HGW17:=FILTER(HGW13,10);
HGW18:=牛启动 AND HGW17;
STICKLINE(HGW18,(-0.08),DIFF,2,0),COLORMAGENTA;
STICKLINE(牛启动,0,MACD,1,0),COLORLIMAGENTA;
DRAWTEXT(牛启动,0+0.01,'牛启动'),COLORYELLOW;
DRAWICON(牛启动,0,9);
{底部擒牛选股--};