Miscellaneous blocks

This feature is available to preview in the BETA environment. It will be available in the production environment in the near future.

Miscellaneous blocks

Analytics block (Beta)

Note The Analytics block is only supported in the Live Simulation environment (https://trade.tt/sim). Although it is visible in ADL when in the UAT (https://uat.trade.tt) environment, it will not function properly due to the lack of live market data. Furthermore, algos created and deployed from the Live Simulation environment will currently not run in the Live environment even though the algos may be visible in TT and TT Desktop.

The Analytics block generates bar data using current and historical data for an instrument. You define the duration of a bar and how many rolling bars of data you want the block to store. As each new bar is added, the oldest bar is dropped. Essentially the Analytics block creates a numeric representation of a standard bar chart, similar to the following.

The Analytics block requires three inputs:

  • The instrument port identifies the instrument whose data you want to collect.
  • The interval port defines the length, in minutes, to aggregate data. Supported values: 1-1440.
  • The index port indicates which bar for which to retrieve data. Supported values: 1-number-of-bars (as defined in the block properties).

For each interval, or bar, the block ouputs:

  • Time the interval started and its duration
  • Price at the start of the interval (Open) and the price at the end of the interval (Close)
  • High and low prices during the interval
  • Total volume traded during the interval

At the end of each interval, the block also outputs a discrete event message through its onBarComplete output port to indicate that the next bar's data is available.

Example The Analytics block contains the data for the 10 most recent 1-minute bars for the CME ES Mar19 contract.

You can iterate over the contents of an Analytics block, for example, using a Loop block.

Block properties

To customize the block, update the Block Properties.

Property Description
Name Name to display beneath the block on the ADL canvas
Number of Bars to show/store Number of bars to track. The block outputs the most-recent number of bars. As a new bar is added the oldest bar is dropped.
Expose Bar Outputs Output ports to display for each bar period.

Valid values include:
  • Open: Price at the start of the bar period
  • Close: Price at the end of the bar period
  • High: Highest traded price during the bar period
  • Low: Lowest traded price during the bar period
  • Volume: Volume traded during the bar period
  • OnBarComplete: Discrete message to fire when the current bar completes
  • Start time: Start time of the bar, in seconds since epoch
  • Bar Duration: Elapsed time for the bar, in seconds.