对于一个多选择的条件,比如,当A,B,C其中一个成立时,只要没持仓就开仓,两种写法
一、if A=1 or B=1 or C=1 then tbuy(tholding=0,1,mkt);
二、另一写法:
if A=1 then tbuy(tholding=0,1,mkt);
if B=1 then tbuy(tholding=0,1,mkt);
if C=1 then tbuy(tholding=0,1,mkt);
当同一K线有可能三种情况都出现,而中间又被平过仓,又不写allowrepeat,是不是,只有第二种写法才能保证肯定开得了仓?
单策略才需要加allowrepeat吧?
第二种情况,同一K线中也应该算多策略吧,这样也要allowrepeat吗?
我做的是一分钟K线下的一秒固定轮询