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.
NOTE: you cannot use more than five Analytics blocks in a single algo.
The Analytics block requires three inputs:
For each interval, or bar, the block ouputs:
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.
To customize the block, update the Block Properties.
|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: