成交量:VOL,POINTDOT;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*(HIGH-OPEN+(CLOSE-LOW)),VOL/2)), POINTDOT, ColorGreen;
主动卖盘:IF(CLOSE>OPEN,AA*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,AA*(HIGH-LOW),VOL/2)), POINTDOT, COLORRED;
STICKLINE(主动买盘>0,0,VOL,7,0), Color545454 ;{深灰}
STICKLINE(主动买盘>0,0,主动买盘,7,0), COLOR0088FF;
STICKLINE(主动买盘>0,0,主动买盘,3.800,0), COLOR0088FF;
STICKLINE(主动买盘>0,0,主动买盘,2,0), COLOR0088FF;
STICKLINE(主动卖盘>0,0,主动卖盘,7,0), ColorBlue; {深红}
{STICKLINE(主动卖盘>0,0,主动卖盘,3.800,0), COLOR0077BB;
STICKLINE(主动卖盘>0,0,主动卖盘,2,0), COLOR0077CC;
{NN:=BARSLAST(DATE<>REF(DATE,1))+1;
KH:=HHV(NN,300);
QQ:=OI-REF(OI,1);
K1:=IF(CLOSE>OPEN AND QQ>=0,QQ,0);
KK1:=IF(CLOSE<OPEN AND QQ<0,QQ,0);
KKK1:=IF(CLOSE=OPEN,QQ*0.5,0);
K2:=IF(CLOSE<OPEN AND QQ>=0,QQ,0);
KK2:=IF(CLOSE>OPEN AND QQ<0,QQ,0);
DO:=SUM(K1,NN)+SUM(KK1,NN)+SUM(KKK1,NN);
KO:=SUM(K2,NN)+SUM(KK2,NN)+SUM(KKK1,NN);
N4:=IF(NN<=4,NN,4);
VK1:=IF(CLOSE>=OPEN,VOL,0);
VK2:=IF(CLOSE<=OPEN,VOL,0);
VDO:=SUM(VK1,N4);
VKO:=SUM(VK2,N4);
VDK:=VDO-VKO;
CC:=SUM(QQ,NN);
DRAWNUMBER(ISLASTBAR AND CC>0,CC,CC,0), COLORMAGENTA;
DRAWNUMBER(ISLASTBAR AND CC<0,CC,CC,0), COLORBLUE;
多头持仓:SUM(K1,NN)+SUM(KK1,NN)+SUM(KKK1,NN),LINETHICK2, COLORFF4422;
空头持仓:SUM(K2,NN)+SUM(KK2,NN)+SUM(KKK1,NN),LINETHICK2, COLORGREEN;
W:=MOD(NN,5);
J:=BACKSET(ISLASTBAR,5);
日增减仓变化:SUM(QQ,NN), COLORYELLOW;
DRAWNUMBER(ISLASTBAR,DO,DO,0), COLORFF5555;
DRAWNUMBER(ISLASTBAR,KO,KO,0), COLORGREEN};