LinReg(Array, Period) as Array

LinReg returns an array containing the Linear Regression of the selected period of the array.

 

This function has two parameters:
Array   The array that contains the initial values to process the linear regression
Period   The period used to compute the linear regression. Must be an integer.

 

Example:

' This is an indicator showing the linear regression of the closing prices.
Sub Main()
  SetIndic(LinReg(GetClose, 10))
End Sub