[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] How to calculate a slope % with Rsquared without a loop?



PureBytes Links

Trading Reference Links

Hi,

I'm kind of really new to linear functions and things like that.  I thought Rsquared was necessary to calculate how steep is a slope.  I want to calculate how smooth is a slope from a high point.  I will try your suggestion Ara, but this is kind of new stuff for me.

Thanks,

Louis

2008/9/4 Keith McCombs <kmccombs@xxxxxxxxxxxx>

Louis --
How does the 'Rsquared' from the subject, come into this discussion?
-- Keith


Ara Kaloustian wrote:

You can also use linearray to draw a stright line from HHV to current point.
 
Look up LinearReg function
----- Original Message -----
Sent: Thursday, September 04, 2008 10:37 AM
Subject: Re: [amibroker] How to calculate a slope % with Rsquared without a loop?

Try this:
 
HHV(Var,period);   // find value of highest high
HHVBars(Var,period); // Find number of bars - distance from HHV to current bar
%slope = ((Highest high - currentclose) / Highest high) / number of bars * 100;
 
You may choose to define slope in a different way, but this is the basic structure
 
A
----- Original Message -----
From: Louis P.
Sent: Thursday, September 04, 2008 9:34 AM
Subject: Re: [amibroker] How to calculate a slope % with Rsquared without a loop?

Hi,

Thanks for your response.  I should have said I want to calculate a slope from a high point; I'd like to get a smooth slope from a HHV... How would you do that?

Thanks a lot!
Louis

2008/9/4 Ara Kaloustian <ara1@xxxxxxxxxx>
%slope = (variable - Ref(Variable,-x) ) / Ref(Variable,-x) * 100;
----- Original Message -----
From: Louis P.
Sent: Thursday, September 04, 2008 9:20 AM
Subject: [amibroker] How to calculate a slope % with Rsquared without a loop?

Hi,

I was wondering how to calculate the % of a slope without doing any loop.  Anybody has any idea?

Thanks,

Louis


__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___