Example #1
0
        void AddOrder(Fix.Order order)
        {
            if (_orderTable.Rows.Find(order.ClOrdID) is OrderDataRow _)
            {
                return;
            }

            var row = (OrderDataRow)_orderTable.NewRow();

            row.Order = order;
            row[OrderDataTable.ColumnClOrdId] = order.ClOrdID;
            //
            // Prime these with 0's so the grid looks pretty.
            //
            row[OrderDataTable.ColumnDone]     = 0;
            row[OrderDataTable.ColumnLeaves]   = 0;
            row[OrderDataTable.ColumnAvgPrice] = 0;
            UpdateRow(row);
            _orderTable.Rows.Add(row);
        }
Example #2
0
        void OrderBookOrderInserted(object sender, Fix.OrderBookEventArgs e)
        {
            Fix.Order order = e.Order;
            if (_orderTable.Rows.Find(order.ClOrdID) is OrderDataRow)
            {
                return;
            }

            OrderDataRow row = (OrderDataRow)_orderTable.NewRow();

            row.Order = order;
            row[OrderDataTable.ColumnClOrdId] = order.ClOrdID;
            //
            // Prime these with 0's so the grid looks pretty.
            //
            row[OrderDataTable.ColumnDone]     = 0;
            row[OrderDataTable.ColumnLeaves]   = 0;
            row[OrderDataTable.ColumnAvgPrice] = 0;
            UpdateRow(row);
            _orderTable.Rows.Add(row);
        }