public EditStopLimitOrderViewModel(IClient client, StopLimitOrderDto stopLimitOrder)
 {
     this.client = client;
     this.stopLimitOrder = stopLimitOrder;
     SetFields(stopLimitOrder);
     SetupCommandsAndBehaviour();
 }
 public ClientToServerMessage()
 {
     LimitOrder = new LimitOrderDto();
     MarketOrder = new MarketOrderDto();
     StopLimitOrder = new StopLimitOrderDto();
     DuoLimitOrder = new DuoLimitOrderDto();
     Reset();
 }
        public StopLimitOrderViewModel(StopLimitOrderDto stopLimitOrder, IClient client)
        {
            this.stopLimitOrder = stopLimitOrder;
            this.client = client;
            this.client.StopLimitOrderChanged += client_StopLimitOrderChanged;
            SetFields(stopLimitOrder);

            SetupCommandsAndBehaviour();
        }
Example #4
0
 public void Update(StopLimitOrderDto other)
 {
     Symbol          = other.Symbol;
     Quantity        = other.Quantity;
     LimitPrice      = other.LimitPrice;
     TriggerPrice    = other.TriggerPrice;
     Way             = other.Way;
     ExchangeOrderId = other.ExchangeOrderId;
     ClientId        = other.ClientId;
 }
 public void Update(StopLimitOrderDto other)
 {
     Symbol = other.Symbol;
     Quantity = other.Quantity;
     LimitPrice = other.LimitPrice;
     TriggerPrice = other.TriggerPrice;
     Way = other.Way;
     ExchangeOrderId = other.ExchangeOrderId;
     ClientId = other.ClientId;
 }
 public ServerToClientMessage()
 {
     LimitOrder = new LimitOrderDto();
     LimitOrderList = new List<LimitOrderDto>();
     Execution = new ExecutionDto();
     Level1 = new MarketBestBidAskDto();
     StopLimitOrder = new StopLimitOrderDto();
     StopLimitOrderList = new List<StopLimitOrderDto>();
     Reset();
 }
 private void SetFields(StopLimitOrderDto stopLimitOrder)
 {
     symbol = stopLimitOrder.Symbol;
     quantity = stopLimitOrder.Quantity;
     limitPrice = stopLimitOrder.LimitPrice;
     triggerPrice = stopLimitOrder.TriggerPrice;
     way = stopLimitOrder.Way;
     exchangeOrderId = stopLimitOrder.ExchangeOrderId;
 }
 public IStopLimitOrder NewStopLimitOrder(StopLimitOrderDto dtoStopLimitOrder)
 {
     return NewStopLimitOrder(dtoStopLimitOrder.Symbol, dtoStopLimitOrder.ClientId, dtoStopLimitOrder.TriggerPrice, dtoStopLimitOrder.LimitPrice, dtoStopLimitOrder.Quantity, dtoStopLimitOrder.Way);
 }
 private void SetFields(StopLimitOrderDto stopLimitOrder)
 {
     Symbol = stopLimitOrder.Symbol;
     Quantity = stopLimitOrder.Quantity;
     TriggerPrice = stopLimitOrder.TriggerPrice;
     LimitPrice = stopLimitOrder.LimitPrice;
     OrderId = stopLimitOrder.ExchangeOrderId;
     Way = stopLimitOrder.Way;
 }
 void client_StopLimitOrderChanged(object sender, StopLimitOrderDto e)
 {
     if (e.ExchangeOrderId != stopLimitOrder.ExchangeOrderId)
         return;
     SetFields(e);
 }