MA5:MA(CLOSE,5),COLORffffff;
MA10:MA(CLOSE,10),COLORyellow;
MA20:MA(CLOSE,20),COLOR0000ff;
MA40:MA(CLOSE,40),COLORff0000;
ma60:ma(CLOSE,60),COLOR00ff00;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
前期高位:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT;
前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT;
STICKLINE(C,前期高位,前期高位,5,0),Color00FF00;
STICKLINE(C,前期低位,前期低位,5,0),ColorFF00FF;
月价托:=ma5>ma20 and ma5>ma10 and cross(ma10,ma20);
季价托:=ma20>ma60 and ma20>ma40 and cross(ma40,ma60);
短长价托:=ma5>ma60 and ma5>ma10 and cross(ma10,ma60);
drawtext(月价托,l-0.12,'月价托'),coloryellow;
stickline(月价托,h,l,0.5,1),coloryellow;
stickline(月价托,o,c,6,1),linethick2,coloryellow;
drawtext(季价托,l-0.12,'季价托'),color0099ff;
stickline(季价托,h,l,0.5,1),color0099ff;
stickline(季价托,o,c,6,1),linethick2,color0099ff;
drawtext(短长价托,l-0.12,'短长价托'),color36c0c1;
stickline(短长价托,h,l,0.5,1),color36c0c1;
stickline(短长价托,o,c,6,1),linethick2,color36c0c1;
vol5:=MA(VOL,5);
vol10:=MA(VOL,10);
vol20:=MA(VOL,20);
量托:=vol5>=vol20 and cross(vol10,vol20) and ref(vol10,1)<ref(vol20,1);
drawtext(量托,l*0.97,'量托'),colorwhite;
stickline(量托,h,l,0.5,1),colorwhite;
stickline(量托,o,c,6,1),linethick2,colorwhite;
aa:=BARSLAST(ma60>ma40 and (ma40=ma20 or ma40>ma20));
bb:=ref(count(c<ma60,aa)=aa,1);
cc:=cross(c,ma60) and vol>ma(vol,5) and (c-ref(c,1))/ref(c,1)*100>3;
芙蓉出水:=bb and cc;
drawtext(芙蓉出水,l-0.12,'芙蓉出水'),colorff00ff;
stickline(芙蓉出水,h,l,0.5,1),colorff00ff;
stickline(芙蓉出水,o,c,6,1),linethick2,colorff00ff;
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){ or (ref(ma10,1)<ref(ma5,1) and ma5=ma10)});{下跌后,5日均线和10日均线死叉}
pday5 := barslast(cross(ma5,ma10){ or (ref(ma5,1)=ref(ma10,1) and ma5>ma10)});{回落不久,5日均线和10日均线形成金叉,形成部}
a1:= pday1>pday2 and pday2>pday3 and pday3>pday4 and pday4>pday5 and pday5<5;
a2:= count(cross(ma10,ma5),pday2)=1;
a3:=ma5>ma60 and ma10>ma60;
老鸭头:=(A1 AND A2 and a3) and FILTER(A1 AND A2 and a3 ,5);
drawtext(老鸭头,l,'老鸭头'),coloryellow;
stickline(老鸭头,h,l,0.5,0),coloryellow;
stickline(老鸭头,o,c,6,1),coloryellow,linethick3;
|