参数N 1 6 30
源码
TY:=C;
A1:=REF(TY,N)=HHV(TY,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); HD:=FILTER(C1,N);
A2:=REF(TY,N)=LLV(TY,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); LD:=FILTER(C2,N);
波峰:=REF(H,BARSLAST(HD));
前期高位:=REF(H,BARSLAST(HD)),COLORBLUE,POINTDOT;
前期低位:=REF(L,BARSLAST(LD)),COLORWHITE,POINTDOT;
STICKLINE(H,前期高位,前期高位,5,0),COLORBLUE;
STICKLINE(L,前期低位,前期低位,5,0),COLORWHITE;
DRAWICON(HD,H*1.015,2);
DRAWICON(LD,L*0.985,1);
突破:=FILTER(CROSS(C,波峰),3);
成立:=BARSLAST(突破);
STICKLINE(突破,C,O,1,0),COLORYELLOW;