RegressionSlope

Top  Previous  Next

Finds the linear regression slope of the series.

 

Syntax

 

RegressionSlope( series, bars, [offset] )

 

Parameters

series

 

the name of the series

bars

 

the number of bars over which to find the value

offset

 

the number of bars to offset before finding the value

 

 

 

returns

 

the slope

 

Example

' Find the slope of the linear regression of the last 10 closes.

' Once the slope has been found, we can retrieve the end point as well.

slope = RegressionSlope( instrument.close, 10 )

endPoint = RegressionEnd( instrument.close )

 

 

 

 

 

This example shows the use of the common auto indexed series. For information on using functions with non auto indexed series review Series Functions.