VOL,VOLSTICK;
MA5:MA(VOL,5);
MA10:MA(VOL,10);
MA20:MA(VOL,20);
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主买:=主动买,COLORRED;
主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主卖:=-主动卖,COLORGREEN;
主力净买:(主动买+主动卖),POINTDOT,COLORRED;
净买率:主力净买/VOL*100,POINTDOT,COLORRED;
STICKLINE(主力净买>0,0,主力净买,4,0),COLORRED;
STICKLINE(主力净买<0,0,-主力净买,4,0),COLORYELLOW;
预警:=净买率>90 AND 主力净买/REF(主力净买,1)>2;
大盘止损位①:INDEXC*0.99,COLORFFFF00;
个股止损位②:C*0.98,COLORFFFF00;