The Analytics block generates bar data for an instrument. The Analytics block creates a numeric representation of a standard bar chart, similar to the following. 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.
NOTE: you cannot use more than five Analytics blocks in a single algo.
The Analytics block functionality is only supported in the Production-Live and Production-Simulation environments.
Note: The analytics block cannot be used in the Production-Delayed and the UAT environments.
The Analytics block requires three inputs:
The Analytics Block ouputs values for the current bar and the bar at the specified index in the array. The available fields are:
When adding an Analytics block, you specify the Number of Bars to show/store setting in the Block Properties panel. This value represents the size of the array the block uses to store its historical bar data. When you start an algo, the block's array is loaded with historical data. After a trade occurs for the block's associated instrument, the block begins outputting values through its current bar output ports (open, close, etc.).
At the end of the first interval, the block stores the first interval's values to array index 1 (open_1, close_1, etc.). When the next interval completes, the values in array index 1 are copied to array index 2 (open_2, close_2, etc.) and the values of the current bar are stored in array index 1. This process continues until the array is filled. Once the maximum number of stored bars is reached, the block drops the oldest bar and shifts the array down to make room for the next bar's data.
Example: Time The Analytics block contains the data for the 10 most recent 1-minute bars for the CME 6E Mar20 contract. It displays the values for the current bar and the third most recent bar.
You can iterate over the contents of an Analytics block and output each bar by changing the input of the index port, for example, using a Loop block.
Example: Volume The Analytics block contains the data for the 10 most recent bars for every 10,000 CME ES SEP20 contracts traded. It displays the values for the current bar and the third most recent bar.
The Analytics block also supports several technical indicators to provide additional analysis using the data held by the block. Each technical indicator uses a unique mathematical formula to analyze the data to provide a particular view into the block's data.
For more information about these indicators, see Technical indicators article in the Charts section of the Trade application help
The Average True Range (ATR) indicator measures the size of the period's range and takes into account any gap from the close of the previous period.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed informationabout this technical indicator, see Average True Range in the Charts section of the Trade application help.
The Bollinger Bands indicator determines the upper and lower envelope bands around the price of the instrument. The width of the bands is based on the standard deviation from a moving average of price.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Bollinger Bands (BBANDS) in the Charts section of the Trade application help.
The Moving Average Convergence Divergence (MACD) indicator is based on the differences between two moving averages, a Fast and a Slow moving average.
This indicator adds the following to the Analytics block:
fastPeriod: Number of periods to use in the fast moving average
slowPeriod: Number of periods to use in the slow moving average
signalPeriod: Number of periods in the signal calculation
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Average in the Charts section of the Trade application help.
The Simple Moving Average indicator helps determine whether an instrument's price trend is increasing or decreasing. It calculates a moving average for a most-recent specified number of bars by adding the prices of the selected field for each bar and dividing the sum by the number of periods.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Moving Average in the Charts section of the Trade application help.
The Exponential Moving Average indicator is similar to the Simple Moving Average indicator, but it places greater signficance on the most recent periods when calculating the price trend. The weights of older bars descrease exponentially.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Moving Average in the Charts section of the Trade application help.
The Double Exponential Moving Average indicator is similar to the Exponential Moving Average indicator, but it places greater signficance on the most recent periods when calculating the price trend.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Moving Average in the Charts section of the Trade application help.
The Triple Exponential Moving Average indicator is similar to the Exponential Moving Average indicator, but it places greater significance on the most recent periods when calculating the price trend.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Moving Average in the Charts section of the Trade application help.
The Weighted Moving Average indicator analyzes an instrument's price trend by weighting the band values in older bars in with a decreasing arithmetic progression, as opposed to an exponential progression.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Moving Average in the Charts section of the Trade application help.
The Relative Strength Index (RSI) is used to measure underlying strength of a market move. RSI uses the prior bar's close to current bar's close change. RSI is an oscillator that ranges from 0 (oversold) to 100 (undersold).
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see RSI in the Charts section of the Trade application help.
The Standard Deviation indicator is a statistical calculation used to measure the variability. In trading this value is known as volatility. A low standard deviation indicates that the data points tend to be very close to the average, whereas high standard deviation indicates that the data points are spread out over a large range of values.
This indicator adds the following to the Analytics block:
period: Number of bars to use in the calculations
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Standard Deviation in the Charts section of the Trade application help.
The stochastic oscillator is a momentum indicator that compares the current closing price of an instrument to a range of its prices over a period of time. The sensitivity of the oscillator to market movements can be reduced by adjusting that time period or by taking a moving average of the result. It is generally used to generate overbought and oversold signals.
This indicator adds the following to the Analytics block:
fastK_Period: Number of bars to use when calculating the current value of the indicator (called %K)
slowK_Period: Number of bars to use when smoothing the fast %K values
slowD_Period: Number of bars to use when smoothing the slow %K values
Note All period parameters (i.e., period, fastK_Period, fastPeriod, slowPeriod, signalPeriod, slowK_Period, and slowD_Period) accept a minimum value of 2 and a maximum value of 250.
For detailed information about this indicator, see Stochastic Oscillator ( STOCH) in the Charts section of the Trade application help.
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. Maximum: 250 |
Expose Bar Outputs |
Output ports to display for each bar period.
Valid values include:
|
Indicator | Technical indicator to use in the Analytics block. For more information about these indicators, see Technical indicators. |