|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Linear Regression Angle indicator problem |
[darlu72]
|
Post subject: Linear Regression Angle indicator problem |
Post rating: 0
|
Posted: Thu 31 Mar, 2011, 14:09
|
|
User rating: 0
Joined: Thu 19 Aug, 2010, 13:53 Posts: 62
|
Hi,
Which is the range of the values shown by the Linear Regresion Angle indicator ? I usually see values between ~ -0.1 and + 0.1. What they mean ? degrees/radians ?
I got a look at the ta_lib code for the Linear Regression Angle and I see:
outReal[outIdx++] = Math.atan (m) * ( 180.0 / 3.14159265358979323846 ); where outReal is the returned value for the indicator
Math.atan() returns a value between -pi/2 .. pi/2 and the above would translate in a range -90 .. 90 which would be degrees so that the indicator in JForex should display also ranges between -90 and 90 but I only see values small values as above.
Can you clearify me ? I need to be sure the linear regression angle fits into a range but for that I have to know what it displays degrees/radians/pips or what ? Thank you
|
|
|
|
 |
API Support
|
Post subject: Re: Linear Regression Angle indicator problem |
Post rating: 0
|
Posted: Mon 04 Apr, 2011, 08:12
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Hi, Linear Regression Angle is a Ta-Lib indicator, the following is an extract from the Ta-Lib documentation: Linear Regression is a concept also known as the "least squares method" or "best fit." Linear Regression attempts to fit a straight line between several data points in such a way that distance between each data point and the line is minimized. For each point, a straight line over the specified previous bar period is determined in terms of y = b + m*x: TA_LINEARREG: Returns b+m*(period-1) TA_LINEARREG_SLOPE: Returns 'm' TA_LINEARREG_ANGLE: Returns 'm' in degree. TA_LINEARREG_INTERCEPT: Returns 'b' TA_TSF: Returns b+m*(period)
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|