3.2 Input data for the UDI
As explained above, your UDI receives either a single array of input values, in data.valueData, or the complete bar data for the chart, in data.barData, depending on whether the UDI has a Source field.
The data.valueData is a single array of input values, such as close prices or the values from another indicator. If your UDI is receiving valueData, then it also has access to the date for each value/point, via a data.dates[] array.
The data.barData contains sub-arrays for date, open, high, low, close, and volume: data.barData.date, data.barData.open, data.barData.high , data.barData.low, data.barData.close, and data.barData.volume.
The data.valueCount property defines the number of input data points. It will be same as the length of the data.valueData array, or of each array inside data.barData.
The input data (and also your output data) is indexed with the newest, current value item in [0], and the oldest item in [length-1].
Note: date/time values, in either data.dates or data.barDate.date, are values in milliseconds reflecting the user-configurable time zone for the chart.
Last updated