涨幅跌幅如何定义?
(最高价-当日开盘)/当日开盘?
zuoshou:ref(close,todaybar);
if (h-zuoshou)/zuoshou>=0.01 and time<145500 then buy(holding=0,1,market);
if (l-zuoshou)/l<=-0.01 and time<145500 then buyshort(holding=0,1,market);
if time>=145500 then begin
sellshort(1,0,market);
sell(1,0,market);
end
开仓加了一个时间限定,这下不会平仓后再开了