Samples.Roll.RollSellSide.EmitFilled C# (CSharp) Method

EmitFilled() private method

private EmitFilled ( Order order, ExecutionCommand command ) : void
order FastQuant.Order
command FastQuant.ExecutionCommand
return void
        private void EmitFilled(Order order, ExecutionCommand command)
        {
            // Create execution report for BuySide strategy.

            Instrument instrument = command.Instrument;

            ExecutionReport execution = new ExecutionReport();

            execution.AvgPx = order.AvgPx;
            execution.Commission = 0;
            execution.CumQty = order.CumQty;
            execution.DateTime = framework.Clock.DateTime;
            execution.ExecType = ExecType.ExecTrade;
            execution.Instrument = instrument;
            execution.LastPx = order.AvgPx;
            execution.LastQty = command.Qty;
            execution.LeavesQty = 0;
            execution.Order = command.Order;
            execution.OrdQty = command.Qty;
            execution.OrdStatus = OrderStatus.Filled;
            execution.OrdType = command.Order.Type;
            execution.Price = command.Order.Price;
            execution.Side = command.Order.Side;
            execution.StopPx = command.Order.StopPx;
            execution.Text = command.Order.Text;

            // Emit execution report to BuySide strategy.
            EmitExecutionReport(execution);
        }