pday1 := BARSLAST(CROSS(ma5,ma60));{5日均线上穿60日均线}
pday2 := BARSLAST(CROSS(ma10,ma60));{10日均线上穿60日均线,至此形成鸭颈部}
pday3 := BARSLAST(HIGH=HHV(HIGH,pday2));{形成头部,要下跌}
pday4 := BARSLAST(CROSS(ma10,ma5));{下跌后,5日均线和10日均线死叉}
pday5 := BARSLAST(CROSS(ma5,ma10));{回落不久,5日均线和10日均线形成金叉,形成部}
a1:= pday1 pday2 and pday2 pday3 and pday3 pday4 and pday4 pday5 and pday5
a2:= COUNT(CROSS(ma10,ma5),pday2)=1;
aa:=IF(A1 AND A2 and MA(CLOSE,5) =MA(CLOSE,10) and MA(CLOSE,10) MA(CLOSE,60),10,0),;
bb:=FILTER( A1 AND A2 and MA(CLOSE,5) =MA(CLOSE,10) and MA(CLOSE,10) MA(CLOSE,60),5);
DRAWTEXT(aa and bb ,LOW*0.98,'老鸭头'),colorblue;