请高手看看哪里出问题了,为什么老是每根k线都有信号
以下后台模型使用的目的:用这个模型在后台补充图表模型不能防止秒杀的漏洞的(轮询1秒)
超级止损d:=TENTERPRICE -DYNAINFO( 7)>8 and tholding2>0;
超级止损k:=DYNAINFO( 7)-TENTERPRICE>4 and tholding2<0;
if 超级止损d and tholding2>0 then
begin
tsell(超级止损d,0, MKT);
end
if 超级止损k and tholding2<0 then
begin
tsellshort (超级止损k,0,mkt);
end
//开盘时的资产值
xx:=if(date<>ref(date,1),tasset,0);
期初权益:=valuewhen(xx>0,xx);
当天盈亏:=tasset-期初权益;
if 当天盈亏>25000 and tholding2>0 then
begin
tsell(1,0, MKT);
end
if 当天盈亏>25000 and tholding2<0 then
begin
tsellshort(1,0,mkt);
end