Esempio n. 1
0
 private void HandleOpenOrder(OpenOrderMessage openOrderMessage)
 {
     if (openOrderMessage.Order.WhatIf)
         this.marginDialog.UpdateMarginInformation(openOrderMessage.OrderState);
 }
Esempio n. 2
0
 private void PopulateOrderRow(int rowIndex, OpenOrderMessage orderMessage)
 {
     liveOrdersGrid[0, rowIndex].Value = orderMessage.Order.PermId;
     liveOrdersGrid[1, rowIndex].Value = orderMessage.Order.ClientId;
     liveOrdersGrid[2, rowIndex].Value = orderMessage.Order.OrderId;
     liveOrdersGrid[3, rowIndex].Value = orderMessage.Order.Account;
     liveOrdersGrid[4, rowIndex].Value = orderMessage.Order.Action;
     liveOrdersGrid[5, rowIndex].Value = orderMessage.Order.TotalQuantity;
     liveOrdersGrid[6, rowIndex].Value = orderMessage.Contract.Symbol+" "+orderMessage.Contract.SecType+" "+orderMessage.Contract.Exchange;
     liveOrdersGrid[7, rowIndex].Value = orderMessage.OrderState.Status;
 }
Esempio n. 3
0
 private void UpdateLiveOrders(OpenOrderMessage orderMesage)
 {
     for (int i = 0; i < openOrders.Count; i++ )
     {
         if (openOrders[i].Order.OrderId == orderMesage.OrderId)
         {
             openOrders[i] = orderMesage;
             return;
         }
     }
     openOrders.Add(orderMesage);
 }
Esempio n. 4
0
 private void UpdateLiveOrdersGrid(OpenOrderMessage orderMessage)
 {
     for (int i = 0; i<liveOrdersGrid.Rows.Count; i++)
     {
         if ((int)(liveOrdersGrid[2, i].Value) == orderMessage.Order.OrderId)
         {
             PopulateOrderRow(i, orderMessage);
             return;
         }
     }
     liveOrdersGrid.Rows.Add(1);
     PopulateOrderRow(liveOrdersGrid.Rows.Count - 1, orderMessage);
 }
Esempio n. 5
0
 private void handleOpenOrder(OpenOrderMessage openOrder)
 {
     if (openOrder.Order.WhatIf)
         orderDialog.HandleIncomingMessage(openOrder);
     else
     {
         UpdateLiveOrders(openOrder);
         UpdateLiveOrdersGrid(openOrder);
     }
 }