Discrete blocks

Discrete blocks

MsgInfoExtractor block

The MsgInfoExtractor block extracts user-specified fields contained within a received discrete message. It is commonly used to access details about the event that generated the message. When a new discrete event message triggers the MsgInfoExtractor block, the block will use the subsequent message to update the values of the specified fields.

The MsgInfoExtractor block works as follows:

  1. A discrete event message through the input port triggers the MsgInfoExtractor block.
  2. When triggered, the MsgInfoExtractor block extracts the specified values contained within the input message.
  3. After the extracting the specified values, the MsgInfoExtractor block:
    • Passes the original input message unchanged through its upper-right discrete event message port.
    • Sends each desired value from market data snapshot through the selected output connectors.

Example The MsgInfo Extractor block, configured to extract the fill quantity and fill price receives a discrete event message representing a fill from the Order block. The MsgInfo Extractor block extracts the fill quantity and fill price from the fill discrete message then outputs each and passes the fill discrete message to downstream logic.

Block properties

To change default block properties, modify the desired values in the Block Properties panel.

Property Description
Name Name to display beneath the block on the ADL canvas
Connectors

Values from a message block to expose as output ports, including:

  • limitPrice: Price of an new order
  • orderQuantity: Total order quantity
  • workingQuantity: Working quantity of an order
  • fillPrice: Price of a fill
  • fillQuantity: Quantity of a fill
  • cumQuantity: Sum of fill quantities
  • disclosedQuantity: Quantity of a disclosed order visible in the market
  • deletedQuantity: Canceled quantity of a deleted order
  • tradeQuantity: Quantity of the last trade for a specified instrument
  • tradePrice: Price of the last trade for a specified instrument
  • tradeIsHit: True when the trade hit the bid
  • tradeIsTake: True when the trade took the offer
  • tradeIsUnknown: True when the exchange did not supply whether a trade hit the bid or took the offer
  • tradeIsOTC: True when the trade is an over-the-counter transaction
  • tradeIsImplied: True when the trade occurred at an implied price
  • tradeIsLeg: True when the trade matched a leg of an exchange-listed spread
  • stopTrigger: Price at which the respective stop order is activated
  • isBuy: True when a fill was a buy side execution
  • isQuotingOrder: True when the message was generated by a submitted quote order (valid only for Autospreader order blocks)
  • isHedgeOrder: True when the message was generated by a submitted hedge order (valid only for Autospreader order blocks
  • isExternalEvent: True when the message was generated from a source outside of the algorithm
  • isTriggered: True when an order resulted from a trigger condition
  • instrument: Instrument associated with the message
  • year: Year portion of the date the message occurred
  • month: Month portion of the date the message occurred
  • day: Day portion of the date the message occurred
  • hour: Hour portion of the date the message occurred
  • minute: Minute portion of the date the message occurred
  • second: Second portion of the date the message occurred
  • milliseconds: Millisecond portion of the date the message occurred
  • userFieldN: One of four empty fields that can be populated by a Value Injector and then accessed by a Value Extractor

For each value you select, a corresponding connector is added to the block's outputs.

Note While you can choose to display any or all of the output connectors, they will provide meaningful output on if the information is present in the incoming discrete event message.