private void QueryReplaceOrder() { Console.WriteLine("\nCancelReplaceRequest"); QuickFix.FIX50.OrderCancelReplaceRequest m = QueryCancelReplaceRequest44(); if (m != null && QueryConfirm("Send replace")) { SendMessage(m); } }
public void OnMessage(QuickFix.FIX50.OrderCancelReplaceRequest msg, SessionID s) { string orderid = (msg.IsSetOrderID()) ? msg.OrderID.Obj : "unknown orderID"; QuickFix.FIX50.OrderCancelReject ocj = new QuickFix.FIX50.OrderCancelReject( new OrderID(orderid), msg.ClOrdID, msg.OrigClOrdID, new OrdStatus(OrdStatus.REJECTED), new CxlRejResponseTo(CxlRejResponseTo.ORDER_CANCEL_REPLACE_REQUEST)); ocj.CxlRejReason = new CxlRejReason(CxlRejReason.OTHER); ocj.Text = new Text("Executor does not support order cancel/replaces"); try { Session.SendToTarget(ocj, s); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private QuickFix.FIX50.OrderCancelReplaceRequest QueryCancelReplaceRequest44() { QuickFix.FIX50.OrderCancelReplaceRequest ocrr = new QuickFix.FIX50.OrderCancelReplaceRequest( QueryOrigClOrdID(), QueryClOrdID(), // QuerySymbol(), QuerySide(), new TransactTime(DateTime.Now), QueryOrdType()); ocrr.Set(new HandlInst('1')); if (QueryConfirm("New price")) { ocrr.Set(QueryPrice()); } if (QueryConfirm("New quantity")) { ocrr.Set(QueryOrderQty()); } return(ocrr); }
private QuickFix.FIX50.OrderCancelReplaceRequest QueryCancelReplaceRequest50() { QuickFix.FIX50.OrderCancelReplaceRequest ocrr = new QuickFix.FIX50.OrderCancelReplaceRequest( QueryOrigClOrdID(), QueryClOrdID(), QuerySide(), new TransactTime(DateTime.Now), QueryOrdType()); ocrr.Set(new HandlInst('1')); ocrr.Set(QuerySymbol()); if (QueryConfirm("New price")) ocrr.Set(QueryPrice()); if (QueryConfirm("New quantity")) ocrr.Set(QueryOrderQty()); QueryHeader(ocrr.Header); return ocrr; }