Finds the end point of a linear regression of the series. Note that this function must be used in conjunction with RegressionSlope. This function merely returns the value already calculated by RegressionSlope, so this function must follow RegressionSlope to return the correct value. The series is a required input parameter. There are no other required values since the end point has already been determined.


RegressionEnd( series )





Then name of the series.



'  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.
'  This statement retrieves the Slope of the Close
slope = RegressionSlope( instrument.close, 10 )
'  This Statment returns the Regression End value.
endPoint = RegressionEnd( instrument.close )
'  Plot the linear regression on the bars that
'  have been used to calculate it. This is  a
'  postdictive calculation.
'  The variable plotRegression is declared as
'  an Instrument Permanent Auto Index Series
'  Variable with plotting.
'  Plot the Regression for the last 10 values
For i = 0 TO 9
  plotRegression[i] = endPoint - i * slope
'  This example shows the use of the common
'  auto indexed series.
'  For information on using functions with
'  non auto indexed series review Series Functions.



This example shows the End point value of the Regression Slope of an example auto indexed series.  For information on using functions with non auto indexed series review Series Functions..




See Also:

Series Functions


Edit Time: 5/10/2017 10:30:38 AM

Topic ID#: 492


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software