源码
N:=3;
A1:=REF(HIGH,N)=HHV(HIGH,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(LOW,N)=LLV(LOW,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT((D1 AND E1)));
H2:=(D1 AND NOT((D2 AND E1>=E2)));
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1;
DRAWICON(LD,L,4),PXDN40;
DRAWNUMBER(LD,L,L,3),COLORWHITE,PXDN15;
DRAWSL(LD,L,0,0,3),COLORRED,LINETHICK1;
DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1;
DRAWICON(HD,H,5),PXUP40;
DRAWNUMBER(HD,H,H,3),COLORRED,PXUP15;
DRAWSL(HD,H,0,0,0),COLORYELLOW,LINETHICK1;
%%%%%%%%%%%%%H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
J1:=BACKSET(BARSTATUS=2 ,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J2:=J1>REF(J1,1);
DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2 ,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1;
STICKLINE((C-REF(C,1))/REF(C,1)*100>9.645 AND C=H,O,C,7,0) ,COLORRED;
ZT:=CLOSE>REF(CLOSE,1)*1.095 AND CLOSE=HIGH;
DRAWNUMBER(ZT,L,L,3),PXDN15;
STICKLINE(C/REF(C,1)<0.97AND V>MA(V,5),O,C,7,0),COLORGREEN;
DY:=C/REF(C,1)<0.97 AND V>MA(V,5);
STICKLINE(DY,O,C,7,0),COLORGREEN;
DRAWNUMBER(DY,H,O,3),PXUP15;
BL:=V>1.9*REF(V,1) AND C>O;
STICKLINE(BL,C,O,8,0),COLORMAGENTA;