怎么没有平空开多的指令.
给您提供个简单代码,供您参考
buycond:=ref(count(c>o,2)=2,1);
sellcond:=ref(count(c<o,2)=2,1);
//平空
if holding<0 and buycond then sellshort(1,1,market);
//开多
if buycond and holding=0 then
begin
buy(1,1,market);
end
//平多
if holding>0 and sellcond then sell(1,1,market);
//开空
if holding=0 and sellcond then buyshort(1,1,market),;
你回答我的问题了吗?
我的代码有什么错误?
你策略一共就这么点代码?