
小浪:=11;中浪:=20;大浪:=60;巨浪:=120;黄金分割:=12;
VIP:=1;
HYDB2:DRAWKLINE(H,O,L,C);
巨浪H:DRAWLINE(H=HHV(H,巨浪),H,L=LLV(L,巨浪),L,0)*VIP,LINETHICK3,COLORMAGENTA;
巨浪L:DRAWLINE(L=LLV(L,巨浪),L,H=HHV(H,巨浪),H,0)*VIP,LINETHICK3,COLORMAGENTA;
大浪H:DRAWLINE(H=HHV(H,大浪),H,L=LLV(L,大浪),L,0)*VIP,LINETHICK2,COLORRED;
大浪L:DRAWLINE(L=LLV(L,大浪),L,H=HHV(H,大浪),H,0)*VIP,LINETHICK2,COLORRED;
中浪H:DRAWLINE(H=HHV(H,中浪),H,L=LLV(L,中浪),L,0)*VIP,LINETHICK1,COLORLIBLUE;
中浪L:DRAWLINE(L=LLV(L,中浪),L,H=HHV(H,中浪),H,0)*VIP,LINETHICK1,COLORLIBLUE;
小浪H:DRAWLINE(H=HHV(H,小浪),H,L=LLV(L,小浪),L,0)*VIP,COLOR4080FF;
小浪L:DRAWLINE(L=LLV(L,小浪),L,H=HHV(H,小浪),H,0)*VIP,DOTLINE,COLOR4080FF;
DRAWTEXT_FIX(1,0,0.95,0,'公众号:指标公式源码'),COLORMAGENTA;
高点:IF(CURRBARSCOUNT<=黄金分割*6, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=黄金分割*6)),1)),DRAWNULL)*VIP,COLOR4080FF;
低点:IF(CURRBARSCOUNT<=黄金分割*6, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=黄金分割*6)),1)),DRAWNULL)*VIP,COLOR4080FF;
AH2:高点-(高点-低点)*0.382,COLOR4080FF,DOTLINE;
AH3:高点-(高点-低点)*0.5,COLOR4080FF,DOTLINE;
AH4:高点-(高点-低点)*0.618,COLOR4080FF,DOTLINE;
BH2:高点-(高点-低点)*1.382,COLOR4080FF,DOTLINE;
BH3:高点-(高点-低点)*2,COLOR4080FF,DOTLINE;
BH4:高点-(高点-低点)*1.618,COLOR4080FF,DOTLINE;
CH4:高点-(高点-低点)*-0.618,COLOR4080FF,DOTLINE;
CH3:高点-(高点-低点)*-0.382,COLOR4080FF,DOTLINE;
CH2:高点-(高点-低点)*-1,COLOR4080FF,DOTLINE;
LWS:=CURRBARSCOUNT;
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;