Ejemplo n.º 1
0
        public PositionMessage(IPosition position) : this()
        {
            if (position != null)
            {
                this.SymbolName = position.symbol.name;
                this.Price      = position.price;
                this.Quantity   = position.quantity;
                this.Status     = position.status;
                this.Basis      = position.basis;

                if (position.trades != null)
                {
                    foreach (ITrade t in position.trades)
                    {
                        Trades.Add(new TradeMessage(t));
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public PositionMessage(IPosition position)
            : this()
        {
            if (position != null)
            {
                this.SymbolName = position.symbol.name;
                this.Price = position.price;
                this.Quantity = position.quantity;
                this.Status = position.status;
                this.Basis = position.basis;

                if (position.trades != null)
                {
                    foreach (ITrade t in position.trades)
                    {
                        Trades.Add(new TradeMessage(t));
                    }
                }
            }
        }