test codes:
bool bOrderSelect=OrderSelect(999999,SELECT_BY_TICKET);
Print(bOrderSelect);
Print(OrderOpenPrice()," ",OrderTicket());
output result:
false
0.0 0
>>> nothing is selected
test codes:
bool bOrderSelect=OrderSelect(999999,SELECT_BY_TICKET);
Print(bOrderSelect);
Print(OrderOpenPrice()," ",OrderTicket());
output result:
false
0.0 0
>>> nothing is selected
经过这两天多次测试,我基本确定,在测试模式下,OrderSelect这个函数有问题。
我发现,在测试中,我用OrderSelect(ticket,SELECT_BY_TICKET)这种模式,无论我输入的ticket是多少,但是函数帮我选中的永远是未平仓单中的最新的一单。
坑死我了,这么常用的一个函数竟然有这种问题。