{公式}
TYP:=(2*C+H+L)/4;
HLNT:=(TYP-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;
HLN:SMA(HLNT,20,1),COLORRED;
HLNS:SMA(HLN,5,1),COLORGREEN;
{条件}
主升买:=CROSS(HLN,HLNS) AND HLNS<85;
主升阶段卖:=HLN<REF(HLN,1) AND REF(HLN,1)<REF(HLN,2) AND HLN>HLNS;
主升卖:=CROSS(HLNS,HLN);
{指示}
顶:80,COLORLIBLUE;底:20,COLOR0099FF;
STICKLINE(HLN>HLNS,HLN,HLNS,1,0),COLORMAGENTA;
STICKLINE(HLNS>HLN,HLN,HLNS,1,0),COLORGREEN;
买:IF(主升买,80,0),COLORMAGENTA;
卖:IF(主升卖,20,100),COLORGREEN;
DRAWICON(主升阶段卖,HLN,2);