Re: [amibroker] How to Comparing Slope of Two Linear Regressions?

 

As already pointed, there is no use to calculate the angle that you see on the chart. 
It would change according to the scale you are using.


But, you could compare delta(price) / delta(time).

*** Straight lines are first degrees equations (y = ax + b). The angle of any 1st degree equation is delta(X) / delta(y).


Delta X = delta time = ​
Time variation = number of bars
​ (easiest time counter ever, if you are not on a Tick Chart, Range Bars, Renko...)
.


Delta Y = price Variation = (Final price - initial price)


So, it would be the (price variation) / (number of bars).

Price and time do not change according to the chart graphic scale.


As already pointed, it is not the sloop or angle that you see on the chart, but it is a number (factor) related to the line variation, therefore its sloop.

As this sloop-factor is constant (because its a straight line), you just need two bars to calculated it.


Please, notice that I am talking about price but it is not the Close price of the bar.
Price here means the Y-value (so price) when the line was at its initial bar and the Y-value of the line on its final bar.
Price = the Y-value of the line.


That could be useful to compare trendlines or regression lines of the same symbol and on the same timeframe (as I suggested to use the number of bars). 
For lines drawn on different timeframes, you should treat time in another way or recount the number of bars and recalculate this sloop-factor.


And, to compare different symbols, price variation should be informed in %, like ROC.


That is it.
It has already been discussed here and I stated the same ideas.




2016-05-18 8:27 GMT-03:00 Tomasz Janeczko groups@amibroker.com [amibroker] <amibroker@yahoogroups.com>:
 

Hello,

You need to understand that there is no single "angle" that can be determined
in anisotropic charts, i.e. ones that X axis scale has different units than Y axis.
In price chart X axis scale is TIME where Y axis scale is PRICE (dollars).
There is no fixed mathematical relation between time and dollars, therefore there is no angle.

All charts use dynamic scale, and that means that relation between X and Y is dynamic
and arbitrary based on price movement, zoom factor, display area size, etc.

The concept of using fixed "angles" on the charts come from Gann.
Unfortunatelly all Gann theories involving angles are simply invalid because he "assumed" certain
relationship between TIME and PRICE say: one dollar equals one day.
He drawn his charts ON PAPER and ASSUMMED constant Y scale vs X.
Even such simple fact as inflation makes such constant relationship invalid.
 
Time vs price relationship is not fixed on computer where you can zoom in/out all the way all the time.
How would you define one day in EURUSD and how in say ES contract?
They would be totally different.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-05-18 12:20, meanomalist@yahoo.com [amibroker] wrote:

1) Since the Slope values are dependent of the numbers in the time series, then how can we compare two different time series lin reg slopes?


2) Is this possible to even find how steep or not is the slope? is it called a Angel or Degree?







--
Agradeço antecipadamente,

----------------------------------------------------------
João Flávio Machado Derzi
+55 (31) 9731-4469

__._,_.___

Posted by: =?UTF-8?Q?Jo=C3=A3o_Fl=C3=A1vio_Machado_Derzi?= <joaoderzi@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon