重心线:(H+L+O+C*3)/6;
NX:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:=(20*NX+19*REF(NX,1)+18*REF(NX,2)+17*REF(NX,3)+16*REF(NX,4)
+15*REF(NX,5)+14*REF(NX,6)+13*REF(NX,7)+12*REF(NX,8)+11*REF(NX,9)
+10*REF(NX,10)+9*REF(NX,11)+8*REF(NX,12)+7*REF(NX,13)+6*REF(NX,14)
+5*REF(NX,15)+4*REF(NX,16)+3*REF(NX,17)
+2*REF(NX,18)+REF(NX,20))/210;
牛熊线:MA(牛线,6),COLORGREEN,LINETHICK2;
简底:=H>REF(H,1) AND REF(H,1)<REF(H,2) AND L>REF(L,1) AND REF(L,1)<REF(L,2);
简顶:=H<REF(H,1) AND REF(H,1)>REF(H,2) AND L<REF(L,1) AND REF(L,1)>REF(L,2);
包含1:=REF(H,1)>=REF(H,2) AND REF(L,1)<=REF(L,2);
包含2:=REF(H,1)<=REF(H,2) AND REF(L,1)>=REF(L,2);
包底1:=H>REF(H,2) AND REF(H,2)<REF(H,3) AND L>REF(L,1) AND REF(L,1)<REF(L,3);
包底2:=H>REF(H,1) AND REF(H,1)<REF(H,3) AND L>REF(L,2) AND REF(L,2)<REF(L,3);
包顶1:=H<REF(H,1) AND REF(H,1)>REF(H,3) AND L<REF(L,2) AND REF(L,2)>REF(L,3);
包顶2:=H<REF(H,2) AND REF(H,2)>REF(H,3) AND L<REF(L,1) AND REF(L,1)>REF(L,3);
复底:=IF(包含1,包底1,IF(包含2,包底2,简底));
复顶:=IF(包含1,包顶1,IF(包含2,包顶2,简顶));
底分型:=IF(BARSLAST(CROSS(牛熊线,重心线))>3,FILTER(BACKSET(FILTER(复底 AND 重心线<牛熊线,3),2),1),0);
顶分型:=IF(BARSLAST(CROSS(重心线,牛熊线))>3,FILTER(BACKSET(FILTER(复顶 AND 重心线>牛熊线,3),2),1),0);
STICKLINE(底分型,C,O,8,0),COLORFF00FF,LINETHICK2;
STICKLINE(底分型,C,O,3,0),COLORFF00FF,LINETHICK2;
STICKLINE(底分型,H,L,1,0),COLORFF00FF,LINETHICK2;
STICKLINE(顶分型,C,O,8,0),COLORYELLOW,LINETHICK2;
STICKLINE(顶分型,C,O,3,0),COLORYELLOW,LINETHICK2;
STICKLINE(顶分型,H,L,1,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(底分型,L*0.99,'底型'),COLORRED,LINETHICK1;
DRAWTEXT(顶分型,H*1.02,'顶型'),COLORYELLOW,LINETHICK1;
14P4C050610-5W00.gif
|