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

Re: [amibroker] Re: ROR Rate of return indicator



PureBytes Links

Trading Reference Links

It is my understanding that Lineareg(c,25) is a plot of the endpoints of a
series of 25 day linear regressions fit lines. (ie the classical y=a+bx
where a is the y-intercept and b the slope)

So this should be it.


x=Cum(1);
b=LinRegSlope(C,period);
// dont use the traditional 'a', as thats a pre-defined identifier (average)
i=(Sum(C,period)-b*Sum(x,period))/period;

Lineareg=i+b*x;

Plot(lineareg,"Linear",1);
Plot(C,"Close",2);

--
Nigel Rowe

----- Original Message -----
From: "Owen Davies" <owen5819@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, 18 July 2002 11:26 PM
Subject: Re: [amibroker] Re: ROR Rate of return indicator


> David Holz asked:
>
> > After Taking to Alan her is the ms Version when I convert it to AB
> > the dont seem to plot the same ..
> > also how do i plot a line for the 25 % and 40 % postions on the chart
> > my AB version
> > Graph1 = 200*(LinRegSlope(C,52)-Ref(LinRegSlope(C,52),-26))/C;
>
>
> > MS version
> > 200*(LinearReg(C,52)-Ref(LinearReg(C,52),-26))/C
>
> It looks like your problem is that LinRegSlope is the wrong function.
> You want LinReg--the linear regression line, rather than the slope of
> the line--only I don't think it exists in AFL. Anyone?
>
> Owen Davies
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>