|
Post by bobpit on May 30, 2015 15:26:45 GMT
LinRegSlope is the slope of the LR line.
So I place a line on the chart. Then I click on increase/decrease size of the chart, so as to display more or less bars on the chart. VISUALLY the slope of the line is changing. However the value of LinRegSlope remains the same.
So how come LinRegSlope does not change value? What does it really represents>
I have a feeling this is a stupid question, but please enlighten me, what am I thinking wrong here?
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 30, 2015 16:09:36 GMT
You think of calculating slope from chart pixels which obviously is wrong.
|
|
|
Post by bobpit on May 30, 2015 19:33:20 GMT
fxshrat
could you please elaborate?
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 30, 2015 20:33:39 GMT
If you zoom out then horizontal pixel length decreases, right? If chart height stays the same then slope increases. What does your screen got to do with slope of price line?
Slope of a line is calculated by
a = (endvalue-startvalue)/(endbar-startbar)
|
|
|
Post by bobpit on May 30, 2015 22:26:54 GMT
I am trying to understand what you say.
pixel size cannot change (in mm). However if I zoom out, then the x axis (which is TIME), will try to fit more (time) in the same amount of screen (pixels). Therefore each pixel will correspond to more time, therefore pixel length will increase. Obviously you are saying something very different.
Anyway, the LInRegSlope value is always very close to 0. It has to do with different scale for the Y and X values. In EUR/USD the Y values of the chart may go from 1.3820 to 1.3840, which is 1/500 units. But the chart can easily fit 100 bars, ie 100 units. So the x axis is compressed by about 50.000 times, to make it fit in the screen with the Y axis. So a line that is about 45 degrees, it would normally have a slope of 1. Now in trading software it hardly has a value of 0.00002.
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 30, 2015 22:55:42 GMT
If you have i.e. this zoom level then if choosing some point you have around 200px from left to right and around 140px from top to bottom Making it 140/200 = 0.7 If zooming out then px lengths decrease if choosing same point making it 80/150 = 0.53 So obviously slope of line based on pixel changes. But using pixel is nonsense. PS: In second post I posted some nonsense like height staying constant (wrong).
|
|
|
Post by bobpit on May 31, 2015 7:25:11 GMT
Thanks, now I can see what you mean.
|
|