Werner,
here an example. See chart how it looks like. You
can move the cursur and the channel moves with it,
rgds, Ed
/*
trend channel
development
standard deviation
Edward Pottasch, nov 2004
*/
per = 10; mm = (H + L) / 2;
x = Cum(1); lastx = LastValue(x); selv = SelectedValue(x);
aaa = LinRegIntercept(mm, per); bbb = LinRegSlope(mm, per);
daa = SelectedValue(ValueWhen(x, aaa, 1)); dbb = SelectedValue(ValueWhen(x, bbb, 1));
xx =
IIf(x > selv - per
AND x <= selv, x
- (selv - per),Null); yy = daa + dbb * xx;
// calculate the standard
deviation wd = SelectedValue(StDev(mm,per));
SetChartOptions(0,
chartShowDates); GraphXSpace = 5; Plot(yy, "LinReg", colorBlue, 1); Plot(yy + wd, "Upper Boundary", colorRed, 1); Plot(yy - wd, "Lower Boundary", colorBrightGreen, 1); Plot(C,"",colorWhite,64);
----- Original Message -----
Sent: Monday, March 28, 2005 9:24
PM
Subject: [amibroker] Linear Regression
Channel
Hi there,
does anybody know how to draw the
LINEAR REGRESSION CHANNEL ?
Parallel lines are drawn 2 Standard
Deviations above and below a Linear Regression Trend Line.
Thanks
for any
suggestions.
Werner
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 other support material please check also: http://www.amibroker.com/support.html
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 other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Sponsor |
ADVERTISEMENT
| |
|
Yahoo! Groups Links
|