AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主卖:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2));
量:=VOL;
额:=AMOUNT/100000000;
流入额:MA(主买,4)/100000,COLORRED,LINETHICK1;
流出额:MA((0-主卖),4)/100000,COLORLIGREEN,LINETHICK1;
净流入:流入额-流出额,COLORFE10D2,LINETHICK1;
BB:=(主买+主卖);
STICKLINE(流入额>流出额,流入额,流出额,2,0),COLOR000099;
STICKLINE(流入额>流出额,流入额,流出额,2,0),COLOR0000CC;
STICKLINE(流入额>流出额,流入额,流出额,1.2,0),COLOR0000FF;
STICKLINE(流入额>流出额,流入额,流出额,0.2,0),COLORCC66FF;
STICKLINE(流入额<流出额,流出额,流入额,2,0),COLORFF6600;
STICKLINE(流入额<流出额,流出额,流入额,1,0),COLORFF9900;
STICKLINE(流入额<流出额,流出额,流入额,1.2,0),COLORFFCC00;
STICKLINE(流入额<流出额,流出额,流入额,0.2,0),COLORCYAN;