public zo21q6cy3fImtUHATQ(SimulationExecutionProvider obj0, FIXNewOrderSingle obj1) { this.smCF4MYTNu = new Quote(); this.j57Fjc16NJ = 1E-08; this.A8bFJItyyx = obj0; this.PYBF7sahqY = obj1; this.kUyFaL3cQu = obj0.FillOnBarMode; this.L27FNaAWTp = obj0.FillAtLimitPrice; this.yFOFUpVbqt = obj0.FillAtStopPrice; if (obj1.TradeVolumeDelay == 0) { this.gxTF8gufMx = true; } if ((this.PYBF7sahqY as SingleOrder).OrdType == OrdType.TrailingStop || (this.PYBF7sahqY as SingleOrder).OrdType == OrdType.TrailingStopLimit) { switch ((this.PYBF7sahqY as SingleOrder).Side) { case Side.Buy: case Side.BuyMinus: this.zGRFvN99ge = double.MaxValue; break; case Side.Sell: case Side.SellShort: this.zGRFvN99ge = double.MinValue; break; default: throw new NotSupportedException("" + obj1.Side.ToString()); } } this.A8bFJItyyx.MyIPdEI7fi.Add(this.PYBF7sahqY.ClOrdID, this); this.dGEFgdOydF(); }
public SimulationExecutionProcessor(SimulationExecutionProvider provider, FIXNewOrderSingle order) { this.fProvider = provider; this.fOrder = order; this.fFillOnBarMode = provider.FillOnBarMode; if ((this.fOrder as SingleOrder).OrdType == OrdType.TrailingStop) { switch ((this.fOrder as SingleOrder).Side) { case Side.Buy: case Side.BuyMinus: this.fTrailingStopExecPrice = 1.7976931348623157E+308; goto IL_AE; case Side.Sell: case Side.SellShort: this.fTrailingStopExecPrice = -1.7976931348623157E+308; goto IL_AE; } throw new NotSupportedException("Order side is not supported : " + order.Side.ToString()); } IL_AE: this.fProvider.fProcessors.Add(this.fOrder.ClOrdID, this); this.Init(); }
public override void Send(FIXNewOrderSingle Order) { QuickFix42.NewOrderSingle order = new QuickFix42.NewOrderSingle( new QuickFix.ClOrdID(Order.ClOrdID), //new QuickFix.HandlInst(Order.HandlInst), new QuickFix.HandlInst(HandlInst.AUTOEXECPRIV), // GS FIX new QuickFix.Symbol(Order.Symbol.Substring(0, 6)), new QuickFix.Side(Order.Side), new QuickFix.TransactTime(Order.TransactTime), new QuickFix.OrdType(Order.OrdType)); if ((Order.OrdType == FIXOrdType.Limit || Order.OrdType == FIXOrdType.StopLimit) && Order.ContainsField(EFIXField.Price)) { order.set(new QuickFix.Price(Order.Price)); } if ((Order.OrdType == FIXOrdType.Stop || Order.OrdType == FIXOrdType.StopLimit) && Order.ContainsField(EFIXField.StopPx)) { order.set(new QuickFix.StopPx(Order.StopPx)); } // 自己计算交易所 if (Order.Symbol.StartsWith("60") || Order.Symbol.StartsWith("51")) { //order.set(new QuickFix.SecurityExchange("XSHG"));// 上海 order.set(new QuickFix.SecurityExchange("SS"));// 上海 } else if (Order.Symbol.StartsWith("00") || Order.Symbol.StartsWith("30") || Order.Symbol.StartsWith("15")) { //order.set(new QuickFix.SecurityExchange("XSHE"));// 深圳 order.set(new QuickFix.SecurityExchange("SZ"));// 深圳 } if (Order.Text.StartsWith(OpenPrefix)) { order.setField(new QuickFix.CashMargin(CashMargin.MARGIN_OPEN)); } else if (Order.Text.StartsWith(ClosePrefix)) { order.setField(new QuickFix.CashMargin(CashMargin.MARGIN_CLOSE)); } //order.set(new QuickFix.SecurityType(Order.SecurityType)); order.set(new QuickFix.OrderQty(Order.OrderQty)); //order.set(new QuickFix.Account(Order.Account)); //order.set(new QuickFix.Rule80A(Order.Rule80A)); //order.set(new QuickFix.CustomerOrFirm(Order.CustomerOrFirm)); //if (Order.ContainsField(EFIXField.ClearingAccount)) // order.set(new QuickFix.ClearingAccount(Order.ClearingAccount)); order.set(new QuickFix.Currency("CNY")); // GS FIX Session.sendToTarget(order, orderSessionID); }
public OrderServicePair(FIXNewOrderSingle order, IExecutionService service) { this.order = order; this.service = service; }
public FIXNewOrderSingleEventArgs(FIXNewOrderSingle newOrderSingle) { this.NewOrderSingle = newOrderSingle; }
public NewOrderSingleEventArgs(IExecutionService service, FIXNewOrderSingle order) : base(service) { this.Order = order; }
public virtual void Send(FIXNewOrderSingle order) { }
public override void Send(FIXNewOrderSingle Order) { QuickFix42.NewOrderSingle order = new QuickFix42.NewOrderSingle( new QuickFix.ClOrdID(Order.ClOrdID), //new QuickFix.HandlInst(Order.HandlInst), new QuickFix.HandlInst(HandlInst.AUTOEXECPRIV), // GS FIX new QuickFix.Symbol(Order.Symbol.Substring(0,6)), new QuickFix.Side(Order.Side), new QuickFix.TransactTime(Order.TransactTime), new QuickFix.OrdType(Order.OrdType)); if ((Order.OrdType == FIXOrdType.Limit || Order.OrdType == FIXOrdType.StopLimit) && Order.ContainsField(EFIXField.Price)) order.set(new QuickFix.Price(Order.Price)); if ((Order.OrdType == FIXOrdType.Stop || Order.OrdType == FIXOrdType.StopLimit) && Order.ContainsField(EFIXField.StopPx)) order.set(new QuickFix.StopPx(Order.StopPx)); // 自己计算交易所 if (Order.Symbol.StartsWith("60") || Order.Symbol.StartsWith("51")) { //order.set(new QuickFix.SecurityExchange("XSHG"));// 上海 order.set(new QuickFix.SecurityExchange("SS"));// 上海 } else if (Order.Symbol.StartsWith("00") || Order.Symbol.StartsWith("30") || Order.Symbol.StartsWith("15")) { //order.set(new QuickFix.SecurityExchange("XSHE"));// 深圳 order.set(new QuickFix.SecurityExchange("SZ"));// 深圳 } if (Order.Text.StartsWith(OpenPrefix)) { order.setField(new QuickFix.CashMargin(CashMargin.MARGIN_OPEN)); } else if (Order.Text.StartsWith(ClosePrefix)) { order.setField(new QuickFix.CashMargin(CashMargin.MARGIN_CLOSE)); } //order.set(new QuickFix.SecurityType(Order.SecurityType)); order.set(new QuickFix.OrderQty(Order.OrderQty)); //order.set(new QuickFix.Account(Order.Account)); //order.set(new QuickFix.Rule80A(Order.Rule80A)); //order.set(new QuickFix.CustomerOrFirm(Order.CustomerOrFirm)); //if (Order.ContainsField(EFIXField.ClearingAccount)) // order.set(new QuickFix.ClearingAccount(Order.ClearingAccount)); order.set(new QuickFix.Currency("CNY")); // GS FIX Session.sendToTarget(order, orderSessionID); }