### Re: Polynomial regression

Posted:

**Sat May 25, 2013 10:23 am**Could you write here the code to calculate the polynomial regression without using lua?

Thank you

Thank you

Your last stop on a way to find a fast growing community of forex traders and software developers. Best forex charts indicators are available here for download. Custom development of indicators and translation to .LUA is also available on request.

http://fxcodebase.com/code/

Page **3** of **5**

Posted: **Sat May 25, 2013 10:23 am**

Could you write here the code to calculate the polynomial regression without using lua?

Thank you

Thank you

Posted: **Sun Jun 02, 2013 11:48 am**

U have to use some programming language.

What is your target platform.

What is your target platform.

Posted: **Wed Jul 17, 2013 7:07 am**

Could you write it in visual basic? Thank you! (It's the only language I know and I'd like to understand something about polynomial regression looking to the code)

Posted: **Thu Jul 18, 2013 1:40 pm**

Unfortunately, I do not know Visual Basic very well.

My interest are MQ4 and Lua.

My interest are MQ4 and Lua.

Posted: **Sat Jul 20, 2013 9:21 am**

Could you write it with algorithms language? Something like this:

for i=0 to n-1

if a<...

end for

etc..

for i=0 to n-1

if a<...

end for

etc..

Posted: **Sat Jul 20, 2013 10:00 am**

More about Polynomial_regression and the exact formula can be found here.

http://en.wikipedia.org/wiki/Polynomial_regression

Channel Calculating

sum=Pow(Price-Regression,2)

sum = (SUM, N)

variance= sqrt(SUM/Period);

BandUp=Regression+Deviation*variance

BandDn=Regression-Deviation*variance

http://en.wikipedia.org/wiki/Polynomial_regression

Channel Calculating

sum=Pow(Price-Regression,2)

sum = (SUM, N)

variance= sqrt(SUM/Period);

BandUp=Regression+Deviation*variance

BandDn=Regression-Deviation*variance

Posted: **Sat Aug 17, 2013 8:19 pm**

Could you make a version without the channel? Only the regression line.

Thank you!

Thank you!

Posted: **Mon Aug 19, 2013 2:10 am**

Your request is added to the development list.

Posted: **Sun Sep 01, 2013 2:39 pm**

Guys,

Would it be possible to add an adjustable start point feature to this indicator.

i.e.; The way the indicator is coded now is that it starts always at the current bar/candle and then calculates back 'X' periods.

Could the indicator have the feature of starting 'X' bars/candle back and then calculate 'X' periods back from the chosen start point?

This would allow anyone to see where the Polynomial Regression Channel was in the past.

Thanks in advance.

Himalaya

Would it be possible to add an adjustable start point feature to this indicator.

i.e.; The way the indicator is coded now is that it starts always at the current bar/candle and then calculates back 'X' periods.

Could the indicator have the feature of starting 'X' bars/candle back and then calculate 'X' periods back from the chosen start point?

This would allow anyone to see where the Polynomial Regression Channel was in the past.

Thanks in advance.

Himalaya

Posted: **Mon Sep 02, 2013 2:03 am**

Hi,

Good idea and I think it would be helpful, too.

If you need an historical polyreg line that does not repaint (shows historically where it was for any given candle at the time of calculating that candle in the past) our friend ScratPower published a modification of PolyReg called Polynomial regression static that does not repaint and posted it here. It is located above (2nd of 3 pages in this post) and it is very useful. If this is not what you need and I misunderstood you, please excuse my intrusion.....and I too would like to see what you ask for if the crew gets time to prioritise it. Until then I find Polyregstatic to be useful if not complete. Thanks to ScratPower, too!

Good idea and I think it would be helpful, too.

If you need an historical polyreg line that does not repaint (shows historically where it was for any given candle at the time of calculating that candle in the past) our friend ScratPower published a modification of PolyReg called Polynomial regression static that does not repaint and posted it here. It is located above (2nd of 3 pages in this post) and it is very useful. If this is not what you need and I misunderstood you, please excuse my intrusion.....and I too would like to see what you ask for if the crew gets time to prioritise it. Until then I find Polyregstatic to be useful if not complete. Thanks to ScratPower, too!