### Polynomial regression

Posted:

**Wed Mar 23, 2011 9:38 pm**Indicator draw a regression curve that is best fits the prices between a starting price point and an ending point.

Parameter [Power] defines power of polynomial which will be used.

[Period] defines range of data on chart.

[Deviation] is used for building band.

If Power=1 we have a linear regression,

if power=2 - quadratic regression and etc.

Power=1:

Power=5:

Formulas for band:

BandUp=Regression+[Deviation]*variance,

BandDn=Regression-[Deviation]*variance, where

variance=sqrt(Sum((Price-Regression)*(Price-Regression)))/Period.

Download:

This version provides you option to choose end points for Polynomial regression.

End Point selection is achieved via "Set Start Date" menu.

Reset menu will return the end point to last period of data stream.

You can notice, End point of Polynomial regression moving average and Polynomial Regression have the same value.

Polynomial regression moving average will therefore show End point of Polynomial regression for each of the historical periods.

Polynomial Regression Slope is an indicator based on Polynomial Regression.

viewtopic.php?f=17&t=59565

Parameter [Power] defines power of polynomial which will be used.

[Period] defines range of data on chart.

[Deviation] is used for building band.

If Power=1 we have a linear regression,

if power=2 - quadratic regression and etc.

Power=1:

Power=5:

Formulas for band:

BandUp=Regression+[Deviation]*variance,

BandDn=Regression-[Deviation]*variance, where

variance=sqrt(Sum((Price-Regression)*(Price-Regression)))/Period.

Download:

This version provides you option to choose end points for Polynomial regression.

End Point selection is achieved via "Set Start Date" menu.

Reset menu will return the end point to last period of data stream.

You can notice, End point of Polynomial regression moving average and Polynomial Regression have the same value.

Polynomial regression moving average will therefore show End point of Polynomial regression for each of the historical periods.

Polynomial Regression Slope is an indicator based on Polynomial Regression.

viewtopic.php?f=17&t=59565