N:=34;
TYP:=(2*C+H+L)/4;
HLNT:=(TYP-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;
k:SMA(HLNT,20,1),LINETHICK2,colorwhite;
kk:SMA(k,5,1),coloryellow;
主升买:=CROSS(k,kk) AND kk<85;
主升阶段卖:=k<REF(k,1) AND REF(k,1)<REF(k,2) AND k>kk;
主升卖:=CROSS(kk,k);
顶:80,colorblue;
底:20,COLOR0099FF;
STICKLINE(kk>k,k,kk,1,1),colorgreen;
买:=IF(主升买,80,0),colormagenta;
卖:IF(主升卖,20,100),LINETHICK2,colorgray;
STICKLINE(k>kk,k,买,1,1),colormagenta;
DRAWICON(主升阶段卖,k,2);