我想分别统计每种不同的出口次数,但比较慢,会什么更好的方法吗?平多出场1:count(开空条件 and ref(holding,1)>0 and holding<0,0),nodraw;
平空出场1:count(开多条件 and ref(holding,1)<0 and holding>0,0),nodraw;
没有,这个方法必须用count对全部K做统计。没有更快的方式了。除非你自己用全局变量记下来。
VARIABLE:ct1:=0;
if 平空开多 and holding>0 then //红色部分必须加上,否则限制不了全局变量的正确自增。
begin
sellshort()
buy()
ct:=ct+1;
end
用全局变量记录下来和用count记录,运算次数会有什么差异吗?好似是差不多的是吧,我感觉用count计算会卡很久
函数底层怎么实现的,我们这边也不清楚。但是目前已知的情况是count并不属于能造成大量计算的函数。