{DRAWTEXT(SYSPARAM(2)=BARSCOUNT(CLOSE),C,'所属板块:'+BLKNAME),COLOR33CC33;}
D1:=REF(H,N);
D2:=D1=HHV(H,2*N+1);
D3:=FILTER(D2,N);
D4:=BACKSET(D3,N+1);
HD:=FILTER(D4,N);
D5:=REF(L,N);
D6:=D5=LLV(L,2*N+1);
D7:=FILTER(D6,N);
D8:=BACKSET(D7,N+1);
LD:=FILTER(D8,N);
D:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
E:=D REF(D,1);
F:=BACKSET(E,REF(BARSLAST(HD),1)+2);
G:=F REF(F,1);
DRAWLINE(G,H,E,H,1),,LINETHICK2,COLORRED;
I:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
J:=I REF(I,1);
K:=BACKSET(J,REF(BARSLAST(LD),1)+2);
M:=K REF(K,1);
DRAWLINE(M,L,J,L,1),,LINETHICK2,COLORRED;
{求压力线方程}
M1:=BARSLAST(E);
M2:=BARSLAST(G);
M3:=REF(H,M1);
M4:=REF(H,M2);
M5:=M4-M2*(M4-M3)/(M2-M1);
DRAWICON(REF(C,1) =REF(M5,1) AND C M5,M5,4);
{求阻力线方程}
N1:=BARSLAST(J);
N2:=BARSLAST(M);
N3:=REF(L,N1);
N4:=REF(L,N2);
N5:=N4-N2*(N4-N3)/(N2-N1);
DRAWICON(REF(C,1) =REF(N5,1) AND C N5,N5,5);
买点:IF(REF(C,1) =REF(M5,1) AND C M5,1,0), LINETHICK0 ;
卖点:IF(REF(C,1) =REF(N5,1) AND C N5,1,0), LINETHICK0 ;
DRAWTEXT(TROUGHBARS(3,15,1) 4,LOW,' 底') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.001,' 顶') , COLORGREEN,LINETHICK1;
DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)) ,LOW*0.99,6);{
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)) ,HIGH*1.02,7);};