PJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-PJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,PJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5)+(V2*V5);
V7:=(V3*V5)+(V4*V5);
WP1:=DYNAINFO(23);
NP1:=DYNAINFO(22);
WP2:=IF(ISLASTBAR,V7*240/FROMOPEN,V7);
NP2:=IF(ISLASTBAR,V6*240/FROMOPEN,V6);
主买:IF(ISLASTBAR AND PERIOD=5,WP1,WP2),COLORRED,NODRAW;
主卖:IF(ISLASTBAR AND PERIOD=5,NP1,NP2),COLORGREEN,NODRAW;
净量:ABS(主买-主卖),NODRAW;
主买1:=BUYVOL,COLORLIRED,NODRAW;
主卖1:=-SELLVOL,COLORLIBLUE,NODRAW;
总净买:BUYVOL-SELLVOL,COLORMAGENTA,NODRAW;
A01:=(VOL/CLOSE)/3;
A02:=SUM((IF(((A01>60) AND C< 15 AND (CLOSE>(REF(CLOSE,1)))),A01,0)),1);
A03:=SUM((IF(((A01>20) AND C>15 AND (CLOSE>(REF(CLOSE,1)))),A01,0)),1);
主力买:(A02+A03),NODRAW,COLORRED;
A04:=SUM((IF(((A01>60) AND C< 15 AND (CLOSE< (REF(CLOSE,1)))),A01,0)),1);
A05:=SUM((IF(((A01>20) AND C>15 AND (CLOSE< (REF(CLOSE,1)))),A01,0)),1);
主力卖:(A04+A05),NODRAW,;
主力净买:IF(FINANCE(7)< 5000000000,(主力买-主力卖)/10,0),COLORYELLOW,NODRAW;
占盘比:主力净买/FINANCE(7)*1000000,NODRAW;
成交量:=VOL,VOLSTICK;
STICKLINE(主力买,主力买,0,2.5,0),COLORRED;
STICKLINE(主力卖,-主力卖,0,2.5,0),COLORGREEN;
STICKLINE(主力净买,主力净买,0,2,0),COLORYELLOW;