public void DeliverExecutionReport(ExecutionReportAdapted executionReportAdapted) { //executionReportAdapted.Account this.AvgPrice = executionReportAdapted.AvgPx; //executionReportAdapted.CashMargin //executionReportAdapted.ClOrdID this.CumQty = executionReportAdapted.CumQty; this.ExecIDList.Add(executionReportAdapted.ExecID); //executionReportAdapted.ExecType //executionReportAdapted.ExpireTime //executionReportAdapted.LastRptRequested this.LeavesQty = executionReportAdapted.LeavesQty; this.OrderID = executionReportAdapted.OrderID; //executionReportAdapted.OrderQty //executionReportAdapted.OrdRejReason this.Status = executionReportAdapted.OrdStatus; if (this.Status == OrderStatus.Filled) { this.FillTime = DateTime.UtcNow; } //executionReportAdapted.OrdType //executionReportAdapted.Side //executionReportAdapted.Slippage //executionReportAdapted.Symbol //executionReportAdapted.TimeInForce //executionReportAdapted.TransactTime this.NotifyChanges(); this.ExecutionReportsDelivered++; }
void Instance_OnExecutionInfo(Counterpart counterpart, ExecutionReportAdapted executionReportAdapted) { switch (counterpart) { case Counterpart.Dukascopy: Order order = this.OrdersBook.Values.ToList().FirstOrDefault(ord => ord.ClOrdID == executionReportAdapted.ClOrdID); if (order != null) { order.DeliverExecutionReport(executionReportAdapted); } else { throw new Exception("no se encontro la orden destino del mensaje"); } break; default: break; } }