这种bug出现2次了,造成损失不小。
如图,当出信号的K线恰好是11:30,10:15,下单就会失败,列表中有下单记录,实际不下单。其他时间没问题。
弄得现在不好办了,第一次以为是帐户脱网,第二次觉得是金字塔bug,希望给测试一下后,给我答复,谢谢。
基本代码如下:
C1:=ref(C,1);
上轨:hhv(C1,NB),colorblack;
下轨:llv(C1,NS),colorblack;
多:=C>上轨 and holding<=0;
空:=C<下轨 and holding>=0;
if 空 then
begin
sell(1,0,market),orderQueue;
buyshort(holding=0,仓,market),orderQueue;
end
if 多 then
begin
sellshort(1,0,market),orderQueue;
buy(holding=0,仓,market),orderQueue;
end