print_order
bool print_order(order ord) { //print("经济公司ID:"+text(ord.brokerId)); //print("资金账户ID:"+ord.accountId); //print("账户下标索引:"+text(ord.accountIndex)); //print("交易日:"+TimeToString(ord.tradingDay)); //print("合约代码:"+ord.symbol); print("报单索引:" + text(ord.orderId)); //print("用户注释:"+ord.userNote); print("报单编号(交易所):"+ord.exchOrderId); //print("报单委托时间(本地):"+timetostring(ord.localDateTime)); //print("报单委托时间(交易所):"+timetostring(ord.createDateTime)); //print("撤单委托时间(交易所):"+timetostring(ord.cancelDateTime)); //print("委托量:"+text(ord.volume)); //print("委托价:"+text(ord.price)); //print("理论价:"+text(ord.theoryPrice)); //print("成交量:"+text(ord.fillVolume)); //print("成交金额:"+text(ord.fillAmount)); //If(ord.side == Enum_Buy) print("方向:"+"买入"); //If(ord.side == Enum_Sell) print("方向:"+"卖出"); If(ord.combOffset == enum_entry) print("开仓"); If(ord.combOffset == enum_exit) print("平仓"); If(ord.combOffset == enum_exittoday) print("平今"); /* If(ord.priceType == Enum_PriceType_Limit) print("价格类型:"+"限价"); else If(ord.priceType == Enum_PriceType_Market) print("价格类型:"+"市价"); else If(ord.priceType == Enum_PriceType_OwnBest) print("价格类型:"+"本方最优"); else If(ord.priceType == Enum_PriceType_OpponentBest) print("价格类型:"+"对手最优"); else If(ord.priceType == Enum_PriceType_BestToCancel) print("价格类型:"+"优五档即时成交剩余撤单"); else If(ord.priceType == Enum_PriceType_BestToLimit) print("价格类型:"+"最优五档即时成交剩余转限价"); else If(ord.priceType == Enum_PriceType_TotalFilledOrCancel) print("价格类型:"+"全成交或撤单"); else If(ord.priceType == Enum_PriceType_FixPrice) print("价格类型:"+"盘后固定价交易"); If(ord.hedge == Enum_HedgeType_Speculatio) print("投机套保:"+"投机"); else If(ord.hedge == Enum_HedgeType_Arbitrage) print("投机套保:"+"套利"); else If(ord.hedge == Enum_HedgeType_Hedge) print("投机套保:"+"套保"); else If(ord.hedge == Enum_HedgeType_MarketMaker) print("投机套保:"+"市商"); */ If(ord.status == Enum_Declare) print("报单状态:"+"申报中"); else If(ord.status == Enum_Declared) print("报单状态:"+"已申报"); else If(ord.status == Enum_FillPart) print("报单状态:"+"部分成交"); else If(ord.status == Enum_Filled) print("报单状态:"+"全部成交"); else If(ord.status == Enum_Canceling) print("报单状态:"+"撤单中"); else If(ord.status == Enum_Canceled) print("报单状态:"+"撤单完成"); else If(ord.status == Enum_Deleted) print("报单状态:"+"已废除"); /*If(ord.createId == Enum_Trade_Source_Extra) print("报单源ID:"+"非本机"); else If(ord.createId == Enum_Trade_Source_Manual) print("报单源ID:"+"手工"); else If(ord.createId == Enum_Trade_Source_Program) print("报单源ID:"+"程序"); else If(ord.createId == Enum_Trade_Source_TBPY) print("报单源ID:"+"TBPY"); else If(ord.createId == Enum_Trade_Source_Algo) print("报单源ID:"+"算法"); else If(ord.createId == Enum_Trade_Source_Helper) print("报单源ID:"+"交易助手"); else If(ord.createId == Enum_Trade_Source_Monitor) print("报单源ID:"+"头寸监控"); else If(ord.createId == Enum_Trade_Source_Model) print("报单源ID:"+"模式单");*/ print("报单源:"+ord.createSource); //print("撤单源:"+ord.cancelSource); //print("手续费:"+text(ord.commission)); //print("标识信息:"+text(ord.flag)); return true; }