高低点连线形成波浪画线,利用的ZAGZIG之字转向逻辑。
ZH:=ZIGZAG(H,2,1);
ZL:=ZIGZAG(L,2,1);
CONH:=ZH>REF(ZH,1)&&ZH>REFX(ZH,1);
CONL:=ZL<REF(ZL,1)&&ZL<REFX(ZL,1);
N:=BARSLAST(CONL)+1;
M:=BARSLAST(CONH)+1;
LX:=BACKSET((M=1||ISLASTBAR) &&REF(EXIST(N=1,M),1),REF(LLVBARS(L,M),1)+2);
HX:=BACKSET((N=1||ISLASTBAR) &&REF(EXIST(M=1,N),1),REF(HHVBARS(H,N),1)+2);
DRAWLINE1(CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),DASH,COLORRED;
DRAWLINE1(CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),DASH,COLORGREEN;