buy(h>=hp and holding<=0 , 1 ,stopr , max(o,hp) );
BUYSHORT(l<=lp and holding>=0, 1, stopr, min(o,lp) );
运行模式选择高频监控
1、这种高频模式,是否意味着实盘中一根bar内的每一tick都要计算刷一下我整个代码,看看有没有信号
2、假如1的答案是肯定的话,那么如何在代码中设计实现
hp:=ref(hhv(h,10),1);
lp:=ref(llv(l,10),1);
这两句代码每一根bar只计算一次,而不用每tick 都算一次
而下面这两句代码,则每tick计算监控
buy(h>=hp and holding<=0 , 1 ,stopr , max(o,hp) );
BUYSHORT(l<=lp and holding>=0, 1, stopr, min(o,lp) );