LinearReg
- linear regression end-point

Statistical functions
(AmiBroker 4.20)


SYNTAX LinearReg( ARRAY, periods )
RETURNS ARRAY
FUNCTION Calculates linear regression line end-point value according to a + b * x (where a and b are intercept and slope of linear regression line) from the ARRAY using periods range. The function accepts periods parameter that can be constant as well as time-variant (array).
EXAMPLE LinearReg( close, 10 );
SEE ALSO

References:

The LinearReg function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.