N:=5;
STICKLINE(C>O,O,C,3,1),COLORRED;
STICKLINE(C>O,H,C,0,0),COLORRED;
STICKLINE(C>O,O,L,0,0),COLORRED;
STICKLINE(C<o,o,c,3,1),colorff901e;
STICKLINE(C<o,h,o,0,0),colorff901e;
STICKLINE(C<o,c,l,0,0),colorff901e;
STICKLINE(C=O,O,C,3,1),COLORLIGRAY;
STICKLINE(C=O,H,L,0,0),COLORLIGRAY;
TY1:=H;
A1:=REF(TY1,N)=HHV(TY1,2*N+1),NODRAW;
B1:=FILTER(A1,N),NODRAW;
C1:=BacKSET(B1,N+1),NODRAW;
HD1:=FILTER(C1,N),NODRAW;
前高:REF(H,BArslAST(HD1)),COLORYELLOW,POINTDOT;
TY2:=L;
A2:=REF(TY2,N)=LLV(TY2,2*N+1),NODRAW;
B2:=FILTER(A2,N),NODRAW;
C2:=BACKSET(B2,N+1),NODRAW;
HD2:=FILTER(C2,N),NODRAW;
前低:REF(L,BARSLAST(HD2)),COLORGREEN,POINTDOT;
前低起點:=TFILTER(BACKSET(L>前低,BARSLAST(C2)+2),L<=前低,1);
初陰勝陽:=C<=O AND REF(C,1)>REF(O,1) AND V>REF(V,1),NODRAW;
ZQ1:=BARSLAST(初陰勝陽);
FZ1:=BACKSET(前低,ZQ1);
STICKLINE(初陰勝陽,O,C,3,0),COLOR00FF7F;
STICKLINE(初陰勝陽,H,L,0,0),COLOR00FF7F;
初陽勝陰:=C>O AND REF(C,1)<ref(o,1) and="" v="">REF(V,1),NODRAW;
ZQ2:=BARSLAST(初陽勝陰);
FZ2:=BACKSET(前低,ZQ2);
STICKLINE(初陽勝陰,O,C,3,0),COLORLIRED;
STICKLINE(初陽勝陰,L,H,0,0),COLORLIRED;
高:=MAX(C,O);
低:=MIN(C,O);
DRAWLINE(前低起點,MIN(O,C),L>前低 AND (初陰勝陽 OR 初陽勝陰),IF(C>=O,高*0.999,IF(C=O,C*0.999,低*1.001)),1),COLORWHITE;
DRAWLINE(前低起點,MIN(O,C),L>前低,IF(C>O,高*0.999,IF(C=O,C*0.999,低*1.001)),1),COLORWHITE,DOTLINE;