{浪}
巨浪H:DRAWLINE(H=HHV(H,270),H,L=LLV(L,270),L,0),POINTDOT,LINETHICK4,COLORMAGENTA;
巨浪L:DRAWLINE(L=LLV(L,270),L,H=HHV(H,270),H,0),POINTDOT,LINETHICK4,COLORMAGENTA;
大浪H:DRAWLINE(H=HHV(H,90),H,L=LLV(L,90),L,0),LINETHICK3,COLORRED;
大浪L:DRAWLINE(L=LLV(L,90),L,H=HHV(H,90),H,0),LINETHICK3,COLORRED;
中浪H:DRAWLINE(H=HHV(H,30),H,L=LLV(L,30),L,0),LINETHICK2,COLORLIBLUE;
中浪L:DRAWLINE(L=LLV(L,30),L,H=HHV(H,30),H,0),LINETHICK2,COLORLIBLUE;
小浪H:DRAWLINE(H=HHV(H,10),H,L=LLV(L,10),L,0),COLORWHITE;
小浪L:DRAWLINE(L=LLV(L,10),L,H=HHV(H,10),H,0),DOTLINE,COLORWHITE;
ZLH:=STRCAT('顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,30))),0));
ZLL:=STRCAT(' 底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,30))),0));
ZLTS:=STRCAT('中浪:',STRCAT(ZLH,ZLL));
DLH:=STRCAT(' 顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,90))),0));
DLL:=STRCAT(' 底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,90))),0));
DLTS:=STRCAT(' 大浪:',STRCAT(DLH,DLL));
LXTS:=STRCAT('浪型天数: ',STRCAT(ZLTS,DLTS));
DRAWTEXT_FIX(ISLASTBAR=1,0,0,0,LXTS),COLORWHITE;
T:=10*3*N;
A:=H=HHV(H,T) AND HHV(H,T) REF(HHV(H,T),1);
B:=L=LLV(L,T) AND LLV(L,T) REF(LLV(L,T),1);
WAVE1:=DRAWLINE(A,H,B,L,0);
WAVE2:=DRAWLINE(B,L,A,H,0);
ZG:=IF(WAVE1 REF(WAVE1,1) OR WAVE1=WAVE2,WAVE1,WAVE2),COLORMAGENTA;
峰:=WAVE2=WAVE1 AND A;
谷:=WAVE2=WAVE1 AND B;
峰峰天:=BARSLAST(峰)+1;
谷谷天:=BARSLAST(谷)+1;
D1:=HHV(H,T) REF(HHV(H,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;
D2:=LLV(L,T) REF(LLV(L,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;
D3:=IF(谷 OR D2,峰峰天,IF(峰 OR D1,谷谷天,DRAWNULL));
D4:=IF(谷 OR D2,L*0.99,IF(峰 OR D1,H*1.01,DRAWNULL));
DRAWNUMBER(D3 0 AND K=1,D4,SUM( HSL.HSL ,D3)),COLORGREEN;