请问,在一根K线上两个信号,我要先平仓,再开仓,听说是要用ORDERQUEUE函数,
那是,在程序化下单设置里,勾选了顺序下单超市等待0秒,然后“之前报单完全成交后再顺序递交”,这样设置好就可以了吗?
还是在程序代码里要添加orderqueue函数?
还是下单设置和程序代码都要弄?
另外代码如何添加?
ma5:=ma(c,5);
ma20:=ma(c,20);
if MA5>ma20 and holding=0 then buy(1,80%,market),pertrader;
if (c-enterprice)>=yy then sell(1,0,market);
if (enterprice-c)>=ss then sell(1,0,market);
if MA5<ma20 and holding=0 then buyshort(1,80%,market),pertrader;
if (enterprice-c)>=yy then sellshort(1,0,market);
if (c-enterprice)>=ss then sellshort(1,0,market);
1, 设置和程序代码都要设置,才能起到顺序下单的效果;
2,在交易语句后面都要添加orderqueue,如sellshort(1,0,market),orderqueue;