我写了如下逻辑的语句
if true then begin
tbuy;
extgbdataset(‘Num’,extgbdata('Num’)+1);
end
结果监控时发现,tbuy不会每次都触发,而'Num'会上涨,例如tbuy只触发了两笔,但是‘num’已经等于7了
固定轮询
true的话
有几个条件嵌套
if vhy1-vhy2>x
if prebuyhold>0 and extgbdata('Num')<10
if nextbuyhold>now
tbuy(1,1,mkt,0,0,AccountID,HY2);
伪代码如下
if hold=0 then
extgbdataset('Num',0);
end
if 开仓条件满足 且 Num<10 then
if hold=0 then
tbuy;
extgbdataset('Num',1);
end
if hold>0 then
tbuy;
extgbdataset('Num',extgbdata('Num')+1);
end
end
固定时间间隔,如果不是使用ALLOWREPEAT函数是,软件会自动过滤掉同根k上出现的重复信号。每根K只会开一次仓。
哦,谢谢解释!
那我现在用了allowrepeat以后为什么会出现这样的问题呢?