编写要求:
www.gszx.com.cn网解答:
网友求助:
源码如下
IF DATATYPE=6 then exit;
ZF:=C/DYNAINFO(3)>=1.099;
TF:=DYNAINFO(3)/C>=1.110;
bidoor:=5000; //大单门限
sudoor:=80000; //超大单门限
buy:=IF(ZF,VOL,IF(TF,0,BUYVOL)); //应该是这里有问题,不过想来想去没搞懂
sell:=IF(ZF,0,IF(TF,VOL,SELLVOL)); //涨停时记SELLVOL为流入,故为buy,跌停反之
sub:=IF(buy*C>=sudoor,buy,0);
sus:=IF(sell*C>=sudoor,sell,0);
bib:=IF(buy*C<sudoor AND buy*C>=bidoor,buy,0);
bis:=IF(sell*C<sudoor AND sell*C>=bidoor,sell,0);
lib:=IF(buy*C<bidoor,buy,0);
lis:=IF(sell*C<bidoor,sell,0);
ssub:SUM(sub,0);
ssus:SUM(sus,0);
sbib:SUM(bib,0);
sbis:SUM(bis,0);
slib:SUM(lib,0);
slis:SUM(lis,0);
msub:SUM(sub*DYNAINFO(7),0);
msus:SUM(sus*DYNAINFO(7),0);
mbib:SUM(bib*DYNAINFO(7),0);
mbis:SUM(bis*DYNAINFO(7),0);
mlib:SUM(lib*DYNAINFO(7),0);
mlis:SUM(lis*DYNAINFO(7),0);
净流入:(IF(DYNAINFO(4)>OPEN,REF(AMOUNT,BARPOS-1),IF(DYNAINFO(4)<OPEN,-REF(AMOUNT,BARPOS-1),0))/100+msub+mbib+mlib-(msus+mbis+mlis))/100; //集合竞价流入+开盘后,集合竞价部分不知道是否多余。。。