Exemplo n.º 1
0
        public BlockOrderElement(BlockOrderDocument blockOrderDocument, ClientMarketData.BlockOrderRow blockOrderRow) :
            base("BlockOrder", blockOrderDocument)
        {
            this.blockOrderRow = blockOrderRow;

            AddAttribute("BlockOrderId", this.blockOrderRow.BlockOrderId);
            AddAttribute("StatusCode", this.blockOrderRow.StatusCode);
            AddAttribute("StatusName", this.blockOrderRow.StatusRow.Mnemonic);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a Placement Element.
        /// </summary>
        /// <param name="blockOrderDocument">The parent document of this Xml Node.</param>
        /// <param name="placementRow">The placement record used to create the Xml Node.</param>
        public PlacementsElement(BlockOrderDocument blockOrderDocument, ClientMarketData.PlacementRow placementRow) :
            base("Placement", blockOrderDocument)
        {
            // Keep track of the record that created this element.
            this.placementRow = placementRow;

            // Apply the attributes to the element.
            AddAttribute("PlacementId", placementRow.PlacementId);
            AddAttribute("Quantity", placementRow.Quantity);
            AddAttribute("BrokerId", placementRow.BrokerId);
            AddAttribute("BrokerSymbol", placementRow.BrokerRow.Symbol);
        }
Exemplo n.º 3
0
        public OrdersElement(BlockOrderDocument blockOrderDocument, ClientMarketData.OrderRow orderRow) :
            base("Order", blockOrderDocument)
        {
            this.orderRow = orderRow;

            AddAttribute("OrderId", this.orderRow.OrderId);
            AddAttribute("AccountId", this.orderRow.AccountId);
            AddAttribute("SecurityId", this.orderRow.SecurityId);

            AddAttribute("SecurityName", this.orderRow.SecurityRowByFKSecurityOrderSecurityId.ObjectRow.Name);
            AddAttribute("SecuritySymbol", this.orderRow.SecurityRowByFKSecurityOrderSecurityId.Symbol);

            AddAttribute("SettlementName", this.orderRow.SecurityRowByFKSecurityOrderSettlementId.ObjectRow.Name);
            AddAttribute("SettlementSymbol", this.orderRow.SecurityRowByFKSecurityOrderSettlementId.Symbol);

            AddAttribute("PositionTypeCode", this.orderRow.PositionTypeCode);
            AddAttribute("TransactionTypeCode", this.orderRow.TransactionTypeCode);
            AddAttribute("TransactionTypeName", this.orderRow.TransactionTypeRow.Mnemonic);
            AddAttribute("Quantity", this.orderRow.Quantity);
            AddAttribute("TimeInForceCode", this.orderRow.TimeInForceCode);
            AddAttribute("TimeInForceName", this.orderRow.TimeInForceRow.Mnemonic);
            AddAttribute("OrderTypeCode", this.orderRow.OrderTypeCode);
            AddAttribute("OrderTypeName", this.orderRow.OrderTypeRow.Mnemonic);

            ClientMarketData.PriceRow priceRow = ClientMarketData.Price.FindBySecurityIdCurrencyId(
                this.orderRow.SecurityId, this.orderRow.SettlementId);
            if (priceRow != null)
            {
                AddAttribute("LastPrice", priceRow.LastPrice);
                AddAttribute("BidPrice", priceRow.BidPrice);
                AddAttribute("BidSize", priceRow.BidSize);
                AddAttribute("AskPrice", priceRow.AskPrice);
                AddAttribute("AskSize", priceRow.AskSize);
            }

            if (!this.orderRow.IsPrice1Null())
            {
                AddAttribute("Price1", this.orderRow.Price1);
            }
            if (!this.orderRow.IsPrice2Null())
            {
                AddAttribute("Price2", this.orderRow.Price2);
            }
            if (!this.orderRow.IsConditionCodeNull())
            {
                AddAttribute("ConditionCode", this.orderRow.ConditionCode);
            }
            if (!this.orderRow.IsNoteNull())
            {
                AddAttribute("Note", this.orderRow.Note);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a Execution Element.
        /// </summary>
        /// <param name="blockOrderDocument">The parent document of this Xml Node.</param>
        /// <param name="executionRow">The execution record used to create the Xml Node.</param>
        public ExecutionElement(BlockOrderDocument blockOrderDocument, ClientMarketData.ExecutionRow executionRow) :
            base("Execution", blockOrderDocument)
        {
            // Keep track of the record that created this element.
            this.executionRow = executionRow;

            // Apply the attributes to the element.
            AddAttribute("ExecutionId", executionRow.ExecutionId);
            AddAttribute("BrokerId", executionRow.BrokerId);
            AddAttribute("BrokerSymbol", executionRow.BrokerRow.Symbol);
            AddAttribute("Quantity", executionRow.Quantity);
            AddAttribute("Price", executionRow.Price);
        }