Example #1
0
 public virtual void SendNewOrderSingle(FreeQuant.FIX.NewOrderSingle order)
 {
     if (this.IsConnected)
     {
         this.application.Send((FIXNewOrderSingle)order);
     }
     else
     {
         ExecutionReport report = new ExecutionReport();
         report.TransactTime     = Clock.Now;
         report.ClOrdID          = order.ClOrdID;
         report.ExecType         = SmartQuant.FIX.ExecType.Rejected;
         report.OrdStatus        = SmartQuant.FIX.OrdStatus.Rejected;
         report.Symbol           = order.Symbol;
         report.SecurityType     = order.SecurityType;
         report.SecurityExchange = order.SecurityExchange;
         report.Currency         = order.Currency;
         report.Side             = order.Side;
         report.OrdType          = order.OrdType;
         report.TimeInForce      = order.TimeInForce;
         report.OrderQty         = order.OrderQty;
         report.Price            = order.Price;
         report.StopPx           = order.StopPx;
         report.LastPx           = 0.0;
         report.LastQty          = 0.0;
         report.AvgPx            = 0.0;
         report.CumQty           = 0.0;
         report.LeavesQty        = order.OrderQty;
         report.Text             = BeAEwTZGlZaeOmY5cm.J00weU3cM6(2154);
         if (this.pPOK9Nf3hf != null)
         {
             this.pPOK9Nf3hf((object)this, new ExecutionReportEventArgs(report));
         }
         if (this.e4HAgJhCB == null)
         {
             return;
         }
         this.e4HAgJhCB(new ProviderErrorEventArgs((IProvider)this, -1, -1, BeAEwTZGlZaeOmY5cm.J00weU3cM6(2208)));
     }
 }
 public OrderCancelRejectEventArgs(NewOrderSingle order, OrderCancelReject reject) : base()
 {
     this.Order             = order;
     this.OrderCancelReject = reject;
 }
Example #3
0
		public virtual void RegisterOrder(NewOrderSingle order)
		{
		}
Example #4
0
		public virtual void SendNewOrderSingle(NewOrderSingle order)
		{
		}
Example #5
0
 public override void SendNewOrderSingle(NewOrderSingle order)
 {
   if (!order.ContainsField(1) && !string.IsNullOrWhiteSpace(this.DefaultAccount))
     order.Account = this.DefaultAccount.Trim();
   if (!order.ContainsField(109) && !string.IsNullOrWhiteSpace(this.DefaultClientID))
     order.SetStringValue(109, this.DefaultClientID.Trim());
   base.SendNewOrderSingle(order);
 }
Example #6
0
		public virtual void SendNewOrderSingle(NewOrderSingle order)
		{
			if (this.IsConnected)
			{
				this.application.Send((FIXNewOrderSingle)order);
			}
			else
			{
				ExecutionReport report = new ExecutionReport();
				report.TransactTime = Clock.Now;
				report.ClOrdID = order.ClOrdID;
				report.ExecType = FreeQuant.FIX.ExecType.Rejected;
				report.OrdStatus = FreeQuant.FIX.OrdStatus.Rejected;
				report.Symbol = order.Symbol;
				report.SecurityType = order.SecurityType;
				report.SecurityExchange = order.SecurityExchange;
				report.Currency = order.Currency;
				report.Side = order.Side;
				report.OrdType = order.OrdType;
				report.TimeInForce = order.TimeInForce;
				report.OrderQty = order.OrderQty;
				report.Price = order.Price;
				report.StopPx = order.StopPx;
				report.LastPx = 0.0;
				report.LastQty = 0.0;
				report.AvgPx = 0.0;
				report.CumQty = 0.0;
				report.LeavesQty = order.OrderQty;
				report.Text = BeAEwTZGlZaeOmY5cm.J00weU3cM6(4016);
				if (this.q8X4lYTN4C != null)
					this.q8X4lYTN4C((object)this, new ExecutionReportEventArgs(report));
				if (this.j4t4Wyi2Ea == null)
					return;
				this.j4t4Wyi2Ea(new ProviderErrorEventArgs((IProvider)this, -1, -1, BeAEwTZGlZaeOmY5cm.J00weU3cM6(4070)));
			}
		}
Example #7
0
		public SingleOrder() : base()
		{
			this.reports = new ExecutionReportList();
			this.rejects = new OrderCancelRejectList();
			this.replaceOrder = new NewOrderSingle();

			this.ClOrdID = OrderManager.GetOrdId();
			this.OrdStatus = OrdStatus.PendingNew;
			this.HandlInst = '1';
			this.TimeInForce = TimeInForce.Day;
			this.Currency = Framework.Configuration.DefaultCurrency;
			this.Persistent = false;
			this.IsSent = false;
		}
 public ExecutionReportEventArgs(NewOrderSingle order, ExecutionReport report)
 {
     this.Order           = order;
     this.ExecutionReport = report;
 }
Example #9
0
		public ExecutionReportEventArgs(NewOrderSingle order, ExecutionReport report)
		{
 			this.Order = order;
			this.ExecutionReport = report;
		}
		public OrderCancelRejectEventArgs(NewOrderSingle order, OrderCancelReject reject) : base()
		{
			this.Order = order;
			this.OrderCancelReject = reject;
		}
Example #11
0
 public void SendNewOrderSingle(NewOrderSingle order)
 {
   Order order1 = Map.FQ_OQ_Order[(object) order] as Order;
   this.orderRecords.Add(order1, new OrderRecord(order as SingleOrder));
   this.provider.CallSend(order1);
 }
		private void lCXP6mCfhb(NewOrderSingle e)
		{
			SingleOrder singleOrder = e as SingleOrder;
			if (singleOrder.IsFilled || singleOrder.IsCancelled)
				return;
			if (e.OrderQty > 0.0)
			{
				ExecutionReport report = new ExecutionReport();
				report.TransactTime = Clock.Now;
				report.ClOrdID = e.ClOrdID;
				report.ExecType = ExecType.New;
				report.OrdStatus = OrdStatus.New;
				report.Symbol = e.Symbol;
				report.OrdType = e.OrdType;
				report.Side = e.Side;
				report.Price = e.Price;
				report.StopPx = e.StopPx;
				report.TrailingAmt = e.TrailingAmt;
				report.OrderQty = e.OrderQty;
				report.CumQty = 0.0;
				report.LeavesQty = e.OrderQty;
				report.Currency = e.Currency;
				report.Text = e.Text;
				this.JPVPJSWclF(report);
				zo21q6cy3fImtUHATQ zo21q6cy3fImtUhatq = new zo21q6cy3fImtUHATQ(this, e);
			}
			else
			{
				ExecutionReport report = new ExecutionReport();
				report.TransactTime = DateTime.Now;
				report.ClOrdID = e.ClOrdID;
				report.ExecType = ExecType.Rejected;
				report.OrdStatus = OrdStatus.Rejected;
				report.Symbol = e.Symbol;
				report.OrdType = e.OrdType;
				report.Side = e.Side;
				report.Price = e.Price;
				report.StopPx = e.StopPx;
				report.TrailingAmt = e.TrailingAmt;
				report.OrderQty = e.OrderQty;
				report.CumQty = 0.0;
				report.LeavesQty = e.OrderQty;
				report.Currency = e.Currency;
				report.Text = e.Text;
				this.JPVPJSWclF(report);
			}
		}
		public void SendNewOrderSingle(NewOrderSingle order)
		{
			if (this.IsConnected)
			{
				if (this.Latency == 0)
					this.lCXP6mCfhb(order);
				else
					Clock.AddReminder(new ReminderEventHandler(this.MxtPRD9hCH), DateTime.Now.AddMilliseconds(this.Latency), order);
			}
			else
			{
				ExecutionReport report = new ExecutionReport();
				report.TransactTime = DateTime.Now;
				report.ClOrdID = order.ClOrdID;
				report.ExecType = ExecType.Rejected;
				report.OrdStatus = OrdStatus.Rejected;
				report.Symbol = order.Symbol;
				report.SecurityType = order.SecurityType;
				report.SecurityExchange = order.SecurityExchange;
				report.Currency = order.Currency;
				report.Side = order.Side;
				report.OrdType = order.OrdType;
				report.TimeInForce = order.TimeInForce;
				report.OrderQty = order.OrderQty;
				report.Price = order.Price;
				report.StopPx = order.StopPx;
				report.LastPx = 0.0;
				report.LastQty = 0.0;
				report.AvgPx = 0.0;
				report.CumQty = 0.0;
				report.LeavesQty = order.OrderQty;
				report.Text = "text";
				this.JPVPJSWclF(report);
			}
		}
Example #14
0
 public virtual void RegisterOrder(FreeQuant.FIX.NewOrderSingle order)
 {
 }