N:=20;
量能:=(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100;
量能饱和度:IF(量能>100,100,量能),NODRAW;
STICKLINE(((C>0) AND ISLASTBAR),0,100,6,10),COLORFFFFFF;
STICKLINE(((量能饱和度<30) AND ISLASTBAR),0,量能饱和度,5,0),COLORGREEN;
STICKLINE((((量能饱和度>=30) AND (量能饱和度<40)) AND ISLASTBAR),50,量能饱和度,5,0),COLORYELLOW;
STICKLINE((((量能饱和度>=40) AND (量能饱和度<50)) AND ISLASTBAR),50,量能饱和度,5,0),COLORMAGENTA;
STICKLINE(((量能饱和度>=50) AND ISLASTBAR),50,量能饱和度,5,0),COLORRED;
合格量能:量能饱和度>50,NODRAW;
DRAWICON(合格量能=1,50,27);
DRAWICON(量能饱和度=100,30,25);