废单处理
在平仓时,因为仓位不足,导致废单。我写个如下处理。如果接受到平仓废单,则重新下单,将账户内全部实际合约清仓。请老师指教,这样写对不对? OnOrder(OrderRef ord) { Numeric MinPoint; MinPoint = MinMove*PriceScale; if(ord.status == Enum_deleted and ord.combOffset == Enum_Exit) { if(ord.side == Enum_Buy) { Array<Integer> orders; A_SendOrderEx(Enum_Buy,Enum_Entry,A_BuyPosition(0),ord.price+2*MinPoint,orders); }else if(ord.side == Enum_Sell) { Array<Integer> orders; A_SendOrderEx(Enum_Sell,Enum_Entry,A_SellPosition(0),ord.price-2*MinPoint,orders); } } }