Trading Blocks

Trading Blocks

Time And Sales block

The Time And Sales block is a trading block that provides information for individual trades. Whenever a trade occurs for the specified instrument, the Time And Sales block outputs a discrete event message containing information regarding the last trade (trade price or quantity). The discrete event message can be sent to another discrete block, such as the MsgInfo Extractor block, to extract trade data.

The Time And Sales block provides the following trade data:

  • instrument
  • tradeQuantity
  • tradePrice
  • tradeIsHit
  • tradeIsTake
  • tradeIsUnknown
  • tradeIsOTC
  • tradeIsImplied
  • tradeIsLeg
  • trade
  • transaction time (year, month, day, hour, minute, second, milliseconds)

Differences between Time And Sales block values and Field block values

The Time And Sales block and the Field block both allow you to access last-traded-price (LTP) and last-traded-quantity (LTQ) values; however, the values from these two block can differ due to coalescing. Field blocks access coalesced market data, which represent periodic snapshots of the market. For instruments with very active trading, coalescing can cause a Field block to miss an LTP or LTQ that occurs between consecutive snapshots. For many trading purposes, coalesced market data is sufficient. Conversely, the Time And Sales block provides non-coalesced market data. Every time a trade occurs, the block fires a discrete event message containing the information regarding the trade, including the trade price and trade quantity.

Example Differences between Field blocks and Time And Sales blocks

Note When developing an algo, you must start an algo to see time and sales data.

Blocks that can use time and sales data

The following blocks can extract and use the information generated from a Time And Sales block:

Note Certain logic propagated from a Time And Sales block discrete message could behave differently when running an algo in live and simulation modes, due to coalescing differences in the two environments.

Block properties

To customize the block, update the Block Properties.

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