/// <summary> /// Updates the OrderRepresentationlist with new values /// </summary> /// <returns></returns> private void UpdateOrderRepresentationList(OrderRepresentationBookList orderRepresentationBook, OrderRepresentationList orderRepresentationList, OrderList orderList) { // If the orderRepresentationLst for this currencyPair is already present, remove it if (orderRepresentationList != null) { orderRepresentationBook.Remove(orderRepresentationList.CurrencyPair); } // Initialize the Orderlist for this currencyPair orderRepresentationList = new OrderRepresentationList(orderList.CurrencyPair, orderList.OrderSide); // Add each order(Bid or Ask) in the correponding order list (Bids list or Asks list) foreach (Order order in orderList) { orderRepresentationList.AddRecord(order.OpenQuantity.Value, order.Price.Value, order.DateTime); Log.Debug("Order Representation added to Currency Pair : " + order.CurrencyPair + ". OpenQuantity: " + order.OpenQuantity.Value + " | Price: " + order.Price.Value); } // Add the new orderList (order book for bids or asks) to the OrderBooksList of this memory image orderRepresentationBook.AddRecord(orderRepresentationList); }