LinRegForecastArray2 (Function)
Used to calculate the predicted y-value for a given x-value, based on the of the calculation of a linear regression line from the values in two arrays (one with independent values and the other with dependent values).
All array-based function calculations begin with array element 1.
Function
LinRegForecastArray2(IndepArray, DepArray, ArraySz, TgtPos)
Parameters
|
Name |
Type |
Description |
|
IndepArray |
NumericArray |
Specifies the numeric array of independent price points to evaluate. |
|
DepArray |
NumericArray |
Specifies the numeric array of dependent price points to evaluate. |
|
ArraySz |
Numeric |
Specifies the number of array elements to consider in the regression calculation |
| TgtPos | Numeric | A numeric expression representing the data point for which you want to predict a value. Use a negative integer for a future bar, a positive integer for a previous bar, and zero for the current bar. |
Returns
A numeric value containing the predicted y-value for a given x-value, based on the linear regression calculation.