if 金叉 then
begin
//平空开多
sellshort(holding<0 and ccm,0);
buy(holding<=0,1);
end
if 死叉 then
begin
//平多开空
sell(holding>0 and cmc,0);
buyshort(holding>=0,1);
end
我改成
sellshort(金叉 and holding<0 and ccm,0);
buyshort(死叉 and holding>=0,1);
buy(金叉 and holding<=0,1);
sell(死叉 and holding>0 and cmc,0);
执行效果有什么不同吗?
如果有不同~原因是什么?
========================
写法1
sellshort(金叉 and holding<0 and ccm,0); //语句1
buyshort(死叉 and holding>=0,1);//语句2
buy(金叉 and holding<=0,1);//语句3
sell(死叉 and holding>0 and cmc,0);//语句4
写法2
sellshort(金叉 and holding<0 and ccm,0),ORDERQUEUE;
buyshort(死叉 and holding>=0,1),ORDERQUEUE;
buy(金叉 and holding<=0,1),ORDERQUEUE;
sell(死叉 and holding>0 and cmc,0),ORDERQUEUE;
写法1跟写法2有啥不同?
难道不用ORDERQUEUE的话
交易指令的执行就不是按照语句1 语句2 语句3...的顺序执行的吗?