void _t_OnRtnError(object sender, Trade2015.ErrorEventArgs e) { //_curStra = null; if (e.ErrorMsg.IndexOf("no sysid", StringComparison.Ordinal) >= 0) { //Thread.Sleep(200); //_t.ReqOrderAction(e.ErrorID); } }
void trade_OnRtnError(object sender, Trade2015.ErrorEventArgs e) { ShowMsg(string.Format("帐号({0}),错误:{1}--{2}", ((Trade)sender).Investor, e.ErrorID, e.ErrorMsg)); if (e.ErrorMsg.IndexOf("未处理请求超过许可数", StringComparison.Ordinal) >= 0) { //重发 Thread.Sleep(20); OrderField of; if (((Trade)sender).DicOrderField.TryGetValue(e.ErrorID, out of)) { ((Trade)sender).ReqOrderInsert(of.InstrumentID, of.Direction, of.Offset, of.AvgPrice, of.Volume, of.Hedge, Math.Abs(of.LimitPrice) < 1E-6 ? OrderType.Market : OrderType.Limit, of.Custom); } } Ring("指令单错误"); }