VAR1:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
VAR2:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
VAR3:=IF(HIGH=LOW,1,VAR1-MIN(CLOSE,OPEN));
买入:=(VAR2*VAR1)+(VAR3*VAR1);
卖出:=VOL-买入;
买卖差:(买入-卖出),LINETHICK0;
主周仓:=sum(买卖差,5);
主月仓:=sum(买卖差,20);
主上周:=ref(主周仓,5);
主上月:=ref(主月仓,20);
主周增仓:(主周仓-主上周),COLORRED,LINETHICK2;
主月增仓:(主月仓-主上月),colorgreen;
FILLRGN(0,主周增仓,主周增仓>0,rgb(255,0,0));
FILLRGN(0,主周增仓,主周增仓<0,rgb(0,136,0));
0,colorgreen;