A_Buy返回false
Vars Global Integer sendCount(0);Events OnBar(ArrayRef<Integer> indexs) { if(BarStatus == 2 && sendCount <= 2) {//发开仓单 Array<Integer> orders; //指定账户指定合约开多头单 Bool ret = A_Buy(Symbol, 1, Q_AskPrice, orders, "", ""); //Bool ret = Buy(1, Q_AskPrice,0); Commentary("A_Buy:" + IIFString(ret, "True", "False") + "," + TextArray(orders)); if(ret) { sendCount = sendCount + 1; Commentary("true"); Bool ret = FileAppend("C:\\aaa.txt", "true"+Text(Close),True); Print("FileAppend:" + IIFString(ret, "True", "False")); }Else { Commentary("false"); Bool ret = FileAppend("C:\\aaa.txt", "false"+Text(Close),True); }; } if(sendCount <= 2) { Print("-----------"); }Else{Print("==========");}; Commentary("sendCount"+Text(sendCount)); }以上代码在A_Buy一直返回false,后续的打印sendCount一直是0,但是实际上成交了3手,后续便没有继续发单,与sendCount <= 2又是一致的