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.

Moderator: admin

Re: Polynomial regression

Postby Tigre3 » Sat May 25, 2013 10:23 am

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

Postby Apprentice » Sun Jun 02, 2013 11:48 am

U have to use some programming language.
What is your target platform.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

Postby Tigre3 » 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)
Tigre3
 
Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

Postby Apprentice » Thu Jul 18, 2013 1:40 pm

Unfortunately, I do not know Visual Basic very well.
My interest are MQ4 and Lua.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

Postby Tigre3 » 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..
Tigre3
 
Posts: 65
Joined: Sun Oct 14, 2012 4:24 pm

Re: Polynomial regression

Postby Apprentice » 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
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

Postby Tigre3 » Sat Aug 17, 2013 8:19 pm

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

Postby Apprentice » Mon Aug 19, 2013 2:10 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression

Postby Himalaya » 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
Himalaya
 
Posts: 14
Joined: Tue May 14, 2013 9:26 pm

Re: Polynomial regression

Postby Patrick Sweet » 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!
Patrick Sweet
 
Posts: 72
Joined: Fri Apr 26, 2013 4:23 am

PreviousNext

Return to Custom Indicators

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 55 guests