Polynomial regression

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Re: Polynomial regression

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

Thank you
Tigre3

Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

U have to use some programming language.

Apprentice
FXCodeBase: Confirmed User

Posts: 20618
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

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)
Tigre3

Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

Unfortunately, I do not know Visual Basic very well.
My interest are MQ4 and Lua.

Apprentice
FXCodeBase: Confirmed User

Posts: 20618
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

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

for i=0 to n-1
if a<...
end for

etc..
Tigre3

Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

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

Apprentice
FXCodeBase: Confirmed User

Posts: 20618
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

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

Thank you!
Tigre3

Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

Apprentice
FXCodeBase: Confirmed User

Posts: 20618
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

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.

Himalaya
Himalaya

Posts: 14
Joined: Tue May 14, 2013 9:26 pm

Re: Polynomial regression

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!
Patrick Sweet

Posts: 72
Joined: Fri Apr 26, 2013 4:23 am

PreviousNext