九毛八公式指标
公式模块:
最近老是纠结分笔问题,明知这不对,不过既然做了,就学点东西做出来再说,请老师给看看哪里出问题了
源码如下
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; //集合竞价流入+开盘后,集合竞价部分不知道是否多余。。。
ZF:=C=DYNAINFO(53);TF:=C=DYNAINFO(54);
buy:=IF(ZF=1,BUYVOL+SELLVOL,BUYVOL);
sell:=IF(TF=1,BUYVOL+SELLVOL,SELLVOL);