Try TT Now

ADL®

Instrument FieldBlock

You may use the Instrument Field Block to retrieve market depth information.

Operations
  1. The user selects an instrument attribute by double-clicking on the block.
  2. The user provides an Instrument input  .
  3. The block outputs the selected attribute for the specified instrument as .
Recommended Tutorials For This Section

For a tactile learning experience, please try the following tutorial:

  • Instrument Field Block - Retrieving Market Depth Information

Double-Click Edit Window

Double-click on the block to bring up an edit window:

  • Depth Lookup Type: Several attributes will inevitably vary at different depths of the market (e.g., bid quantity). For such attributes, the user may specify a market depth to retrieve the attribute at that price level. The Depth Lookup Type within the Additional Properties menu allows the user to choose a method of specifying a market depth for applicable attributes:

    • None: No market depth specified.
    • Price: When this option is selected, the Instrument Field Block exposes an additional port, as shown in the illustration below. The user may feed a numeric value into this port to specify a price level.

      Example. Instrument Attribute Block with Price port exposed

    • Index: When this option is selected, the Instrument Field Block exposes an additional port, as shown in the illustration below. The user may feed a numeric value into this port to specify an index level. The index level is defined as the number of "ticks" away from the best bid/offer, taking into account only the price levels where the selected attribute is non-zero.

      Example. Instrument Attribute Block with Index port exposed

    ADL Tip. Keep in mind that the Index count does not take into account the price levels where the selected attribute is zero. For instance, the illustration below shows the first three Index Levels of the Bid Quantity for ZS March 2011 contract. In addition, when the provided index is negative or goes beyond the existing market depth, the block will output a zero for quantity-related attributes and a NaN (Not A Number) for price-related attributes.

  • Flip for Sell Orders: Many automated strategies in ADL will have nearly identical buy and sell side routines, with certain blocks acting as "pivot" points. To enable a single algorithm to act either as buy or sell side routine as needed, several blocks in ADL will have the option "Flip For Sell Orders." This option enables them to perform an alternate function depending on the user's selection of the Order Side Variable (either BUY or SELL). The Order Side Variable will appear automatically for any algorithm containing a block with the "Flip For Sell Orders" functionality enabled, and the user must set this variable prior to launching an algorithm. When this functionality is enabled, the following pairs of attributes will alternate depending on the user's selection of the Order Side Variable. (see: Flip For Sell Orders Functionality for more information).

    • Bid Price / Ask Price
    • Bid Qty / Ask Qty
    • High / Low
    • Direct Bid Qty / Direct Ask Qty
    • Bid Orders Qty / Ask Orders Qty
    • Direct Bid Price / Direct Ask Price

    Example. Instrument Attribute Block with Flip for Sell Orders enabled

  • Output Price In Ticks: Setting this property to True will display all price-related fields in number of ticks. Note that quantity-related fields will not be affected.

  • Field: Select one of the following attributes from the drop-down menu:

    Note: There may be a difference in prices displayed within X_TRADER and the prices channeled into the algorithm by the Instrument Field Block. When an algorithm is too busy to process incoming price updates, the updates will be queued. However, when the algorithm is ready to process the updates, it will take the most recent price update and skip the outdated updates. Due to this mechanism it is possible that price updates can be skipped depending on the circumstances. In addition, there is another possibility of prices being different due to implied calculations. ADL will always use TT-provided calculations. On the other hand, for X_TRADER, implied calculations can be enabled or disabled from the Trading tab within X_TRADER Properties.

    Attribute Name Description

    Bid Qty

    Bid quantity at the specified market depth including the user’s bids (bid quantity at the best bid price if depth is not specified)

    Bid Price

    Bid price at the specified index level (best bid price if depth is not specified)

    Ask Price

    Ask price at the specified index level (best ask price if depth is not specified)

    Ask Qty

    Ask quantity at the specified market depth including the user’s offers (ask quantity at the best ask price if depth is not specified

    Volume

    Volume traded during the current trading session

    High

    Highest traded price during the current trading session

    Low

    Lowest traded price during the current trading session

    Min Price Increment

    Minimum tradable increment for the specified instrument

    Last Price

    Last traded price

    Settle

    Settled price from the previous trading session

    SettlePriceUnit

    A converted form of the settlement price. This field is only populated by the BVMF Gateway.

    The DI instrument price is an interest rate, annualized, for interbank deposits. Each rate has a corresponding unitary price, or PU, which is the final value discounted by the interest rate adjusted by the number of workdays to expire.  At the end of each session, the exchange releases the settle denominated in interest rate and its corresponding settle in unitary price, which is the SettlePriceUnit.

    Direct Bid Qty

    Non-implied bid quantity at the specified market depth (if market depth is not provided: non-implied bid quantity at the highest bid price where there is at least one non-implied bid)

    Direct Ask Qty

    Non-implied ask quantity at the specified market depth (if market depth is not provided: non-implied ask quantity at the lowest ask price where there is at least one non-implied bid)

    Bid Order Qty

    Number of bid orders at the specified market depth including the user’s orders (bid orders at the best bid price if depth is not provided)

    Note: The Instrument Field Block will output a zero value if this field is unsupported by the exchange or when the market is empty. TT or the exchange can verify if this field is supported.

    Ask Order Qty

    Number of ask orders at the specified market depth including the user’s offers (ask orders at the best ask price if depth is not provided)

    Note: The Instrument Field Block will output a zero value if this field is unsupported by the exchange or when the market is empty. TT or the exchange can verify if this field is supported.

    Last Trade Qty

    Either accumulated or the last quantity traded at the last traded price (depending on the user's Gateway settings)

    Direct Bid Price

    Bid price at the specified index level, taking into account only the levels where there is at least one non-implied bid (if depth is not specified: highest bid price where there is a non-implied bid)

    Direct Ask Price

    Ask price at the specified index level, taking into account only the levels where there is at least one non-implied offer (if depth is not specified: lowest ask price where there is a non-implied offer)

    Workup Price

    Brokertec trade price

    Min Tick Increment

    Minimum achievable tick increment for the specified instrument

    Note: A single instrument could have differing Minimum Price Increment and Minimum Tick Increment. For example, an outright S&P 500 E-mini contract has a Minimum Price Increment of 25 (because it trades in an increment of 25), but it has a Minimum Tick Increment of 5 (because an E-mini spread trades in an increment of 5).