コード例 #1
0
ファイル: CommissionProvider.cs プロジェクト: heber/FreeOQ
		public virtual FIXCommissionData GetCommissionData(FIXExecutionReport report)
		{
			FIXCommissionData data = new FIXCommissionData();
			data.CommType = FIXCommType.ToFIX(this.fCommType);
			data.Commission = this.fCommission;
			if (this.fMinCommission != 0.0)
			{
				double num;
				switch (this.fCommType)
				{
					case CommType.PerShare:
						num = this.fCommission * report.CumQty;
						break;
					case CommType.Percent:
						num = this.fCommission * report.CumQty * report.AvgPx;
						break;
					case CommType.Absolute:
						num = this.fCommission;
						break;
					default:
						throw new NotSupportedException("");
				}
				if (num < this.fMinCommission)
				{
					data.CommType = '3';
					data.Commission = this.fMinCommission;
				}
			}
			return data;
		}
コード例 #2
0
ファイル: OrderDbServer.cs プロジェクト: heber/FreeOQ
		public void AddReport(IOrder order, FIXExecutionReport report)
		{
			lock (this)
			{
				FIXDbServer.RemoveFIXGroup(this.connection, "atable", order.Id);
				FIXDbServer.SaveFIXGroup(this.connection, (FIXGroup) (order as SingleOrder), "ordertable", order.Id);
				IDbCommand cmd = this.connection.CreateCommand();
				cmd.CommandText = "";
				FIXDbServer.SetCommandParameter(cmd, "atable", DbType.Int32, order.Id);
        cmd.ExecuteNonQuery();
        cmd.Dispose();
				IDbCommand cmd2 = this.connection.CreateCommand();
				cmd2.CommandText = "";
        report.Id = Convert.ToInt32(cmd2.ExecuteScalar());
        cmd2.Dispose();
				FIXDbServer.SaveFIXGroup(this.connection, report, "report.table", report.Id);
			}
		}
コード例 #3
0
ファイル: QuickFIX44Application.cs プロジェクト: heber/FreeOQ
		public virtual void Send(FIXExecutionReport report)
		{
		}
コード例 #4
0
 public FIXExecutionReportEventArgs(FIXExecutionReport ExecutionReport)
 {
   this.VhfuUiEk7S = ExecutionReport;
 }
コード例 #5
0
		public void Send(FIXExecutionReport message)
		{
		}
コード例 #6
0
ファイル: OrderFileServer.cs プロジェクト: heber/FreeOQ
        public void AddReport(IOrder order, FIXExecutionReport report)
        {

        }
コード例 #7
0
ファイル: QuickFIX42Application.cs プロジェクト: heber/FreeOQ
		public virtual void Send(FIXExecutionReport Report)
		{
			QuickFix.FIX42.ExecutionReport executionReport = new QuickFix42.ExecutionReport(new OrderID(Report.OrderID), new ExecID(Report.ExecID), new QuickFix.ExecTransType('0'), new QuickFix.ExecType(Report.ExecType), new QuickFix.OrdStatus(Report.OrdStatus), new Symbol(Report.Symbol), new QuickFix.Side(Report.Side), new LeavesQty(Report.LeavesQty), new CumQty(Report.CumQty), new AvgPx(Report.AvgPx));
			if (Report.ContainsField(198))
				executionReport.set(new SecondaryOrderID(Report.SecondaryOrderID));
			if (Report.ContainsField(11))
				executionReport.set(new ClOrdID(Report.ClOrdID));
			if (Report.ContainsField(41))
				executionReport.set(new OrigClOrdID(Report.OrigClOrdID));
			if (Report.ContainsField(66))
				executionReport.set(new ListID(Report.ListID));
			if (Report.ContainsField(19))
				executionReport.set(new ExecRefID(Report.ExecRefID));
			if (Report.ContainsField(103))
				executionReport.set(new OrdRejReason(Report.OrdRejReason));
			if (Report.ContainsField(378))
				executionReport.set(new ExecRestatementReason(Report.ExecRestatementReason));
			if (Report.ContainsField(1))
				executionReport.set(new Account(Report.Account));
			if (Report.ContainsField(65))
				executionReport.set(new SymbolSfx(Report.SymbolSfx));
			if (Report.ContainsField(48))
				executionReport.set(new SecurityID(Report.SecurityID));
			if (Report.ContainsField(167))
				executionReport.set(new QuickFix.SecurityType(Report.SecurityType));
			if (Report.ContainsField(200))
				executionReport.set(new MaturityMonthYear(Report.MaturityMonthYear));
			if (Report.ContainsField(202))
				executionReport.set(new StrikePrice(Report.StrikePrice));
			if (Report.ContainsField(206))
				executionReport.set(new OptAttribute(Report.OptAttribute));
			if (Report.ContainsField(231))
				executionReport.set(new ContractMultiplier(Report.ContractMultiplier));
			if (Report.ContainsField(223))
				executionReport.set(new CouponRate(Report.CouponRate));
			if (Report.ContainsField(207))
				executionReport.set(new SecurityExchange(Report.SecurityExchange));
			if (Report.ContainsField(106))
				executionReport.set(new Issuer(Report.Issuer));
			if (Report.ContainsField(348))
				executionReport.set(new EncodedIssuerLen(Report.EncodedIssuerLen));
			if (Report.ContainsField(349))
				executionReport.set(new EncodedIssuer(Report.EncodedIssuer));
			if (Report.ContainsField(107))
				executionReport.set(new SecurityDesc(Report.SecurityDesc));
			if (Report.ContainsField(350))
				executionReport.set(new EncodedSecurityDescLen(Report.EncodedSecurityDescLen));
			if (Report.ContainsField(351))
				executionReport.set(new EncodedSecurityDesc(Report.EncodedSecurityDesc));
			if (Report.ContainsField(38))
				executionReport.set(new OrderQty(Report.OrderQty));
			if (Report.ContainsField(152))
				executionReport.set(new CashOrderQty(Report.CashOrderQty));
			if (Report.ContainsField(40))
				executionReport.set(new QuickFix.OrdType(Report.OrdType));
			if (Report.ContainsField(44))
				executionReport.set(new Price(Report.Price));
			if (Report.ContainsField(99))
				executionReport.set(new StopPx(Report.StopPx));
			if (Report.ContainsField(388))
				executionReport.set(new DiscretionInst(Report.DiscretionInst));
			if (Report.ContainsField(15))
				executionReport.set(new QuickFix.Currency(Report.Currency));
			if (Report.ContainsField(376))
				executionReport.set(new ComplianceID(Report.ComplianceID));
			if (Report.ContainsField(59))
				executionReport.set(new QuickFix.TimeInForce(Report.TimeInForce));
			if (Report.ContainsField(168))
				executionReport.set(new EffectiveTime(Report.EffectiveTime));
			if (Report.ContainsField(126))
				executionReport.set(new ExpireTime(Report.ExpireTime));
			if (Report.ContainsField(18))
				executionReport.set(new ExecInst(Report.ExecInst));
			if (Report.ContainsField(31))
				executionReport.set(new LastPx(Report.LastPx));
			if (Report.ContainsField(194))
				executionReport.set(new LastSpotRate(Report.LastSpotRate));
			if (Report.ContainsField(195))
				executionReport.set(new LastForwardPoints(Report.LastForwardPoints));
			if (Report.ContainsField(30))
				executionReport.set(new LastMkt(Report.LastMkt));
			if (Report.ContainsField(336))
				executionReport.set(new TradingSessionID(Report.TradingSessionID));
			if (Report.ContainsField(29))
				executionReport.set(new LastCapacity(Report.LastCapacity));
			if (Report.ContainsField(424))
				executionReport.set(new DayOrderQty(Report.DayOrderQty));
			if (Report.ContainsField(425))
				executionReport.set(new DayCumQty(Report.DayCumQty));
			if (Report.ContainsField(426))
				executionReport.set(new DayAvgPx(Report.DayAvgPx));
			if (Report.ContainsField(427))
				executionReport.set(new GTBookingInst(Report.GTBookingInst));
			if (Report.ContainsField(60))
				executionReport.set(new TransactTime(Report.TransactTime));
			if (Report.ContainsField(13))
				executionReport.set(new QuickFix.CommType(Report.CommType));
			if (Report.ContainsField(381))
				executionReport.set(new GrossTradeAmt(Report.GrossTradeAmt));
			if (Report.ContainsField(119))
				executionReport.set(new SettlCurrAmt(Report.SettlCurrAmt));
			if (Report.ContainsField(120))
				executionReport.set(new SettlCurrency(Report.SettlCurrency));
			if (Report.ContainsField(21))
				executionReport.set(new HandlInst(Report.HandlInst));
			if (Report.ContainsField(110))
				executionReport.set(new MinQty(Report.MinQty));
			if (Report.ContainsField(111))
				executionReport.set(new MaxFloor(Report.MaxFloor));
			if (Report.ContainsField(210))
				executionReport.set(new MaxShow(Report.MaxShow));
			if (Report.ContainsField(58))
				executionReport.set(new Text(Report.Text));
			if (Report.ContainsField(354))
				executionReport.set(new EncodedTextLen(Report.EncodedTextLen));
			if (Report.ContainsField(355))
				executionReport.set(new EncodedText(Report.EncodedText));
			if (Report.ContainsField(192))
				executionReport.set(new OrderQty2(Report.OrderQty2));
			if (Report.ContainsField(442))
				executionReport.set(new MultiLegReportingType(Report.MultiLegReportingType));
			try
			{
				Session.sendToTarget((QuickFix.Message)executionReport, this.fSessionID);
			}
			catch (Exception ex)
			{
				Console.WriteLine(BeAEwTZGlZaeOmY5cm.J00weU3cM6(1304) + ex.Message);
			}
		}