Discrete blocks

Discrete blocks

MsgInfo Extractor block

The MsgInfoExtractor block is a discrete block commonly used to take a snapshot of information that can be constantly changing in the market, such as the bid quantity of a given instrument. By taking a snapshot, the user can capture the information at a single moment in time and use the "frozen" information later on even if the market continues to change. However, when a new discrete event message triggers the MsgInfoExtractor block, the block will replace the old snapshot with a new one.

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 takes a "snapshot" of the specified values contained within the input message.

  3. After the taking the snapshot, the MsgInfoExtractor block:

    • Passes the original input message unchanged through its upper-right discrete event message port and starts to output the market data snapshot through the the selected connectors.
    • Sends each desired value from market data snapshot through the selected output connectors.

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.