{自动画线压力支撑线}
N:=8;
XA1:=REF(H,N)=HHV(H,2*N+1);
XB1:=FILTER(XA1,N);
XC1:=BACKSET(XB1,N+1);
XD1:=FILTER(XC1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
XH1:=(XD1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(C)=1;
XL1:=(D2 AND NOT(XD1 AND E1<E2));
XH2:=XD1 AND NOT(D2 AND E1>=E2);
XX1:=REF(BARSLAST(XH1),1)+1;
F1:=BACKSET(XH1 AND COUNT(XL1,XX1)>0,LLVBARS(IF(XL1,L,10000),XX1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
XL2:=LD OR BARSTATUS=2 OR BARSCOUNT(C)=1;
XX2:=REF(BARSLAST(XL2),1)+1;
F2:=BACKSET(XL2 AND COUNT(XH2,XX2)>0,HHVBARS(IF(XH2,H,0),XX2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(BARSTATUS=2 ,BARSLAST(HD)+1);
XS1:=R1>REF(R1,1);
T1:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(XS1,REF(BARSLAST(HD),1)+2);
XS2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);
U3:=T3>REF(T3,1);
R3:=BACKSET(XS2,REF(BARSLAST(HD),1)+2);
XS3:=R3>REF(R3,1);
短压RAWLINE(XS2,H,XS1,H,1),LINEthick2;
短撑RAWLINE(U2,L,U1,L,1),LINEthick2;
DRAWtext(XS2,H*1.02,NUMTOSTR(H)),COLORMAGENTA;
DRAWtext(XS1,H*1.02,NUMTOSTR(H)),COLORMAGENTA;
DRAWtext(XS3,H*1.02,NUMTOSTR(H)),COLORMAGENTA;
DRAWtext(U1,L*0.98,NUMTOSTR(L)),COLORCYAN;
DRAWtext(U2,L*0.98,NUMTOSTR(L)),COLORCYAN;
DRAWtext(U3,L*0.98,NUMTOSTR(L)),COLORCYAN; |