PureBytes Links
Trading Reference Links
|
Hi Ed
I have a same peice of code in excel with the regressionlines as
stated by you. Is it posible for u to code it further so that the
reg-lines can be projected 10timeunits ahead in future.This is what
I have in excel and it is off emmense use.
Regards
--- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
> previous subject line was in error ....
>
> in my attemps to make a trend following systems I made this little
piece of code pure for visualisation. Put is in the Ind. Builder and
click somewhere in the chart with the mouse.
>
> rgds, Ed
>
> /*
>
> trend channel development
>
> 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;
>
> detrend = mm - yy;
> wd = SelectedValue(HHV(abs(detrend),per));
>
> Plot(yy, "LinReg", colorBlue );
> Plot(yy + wd, "Upper Boundary", colorRed );
> Plot(yy - wd, "Lower Boundary", colorBrightGreen );
>
> Plot(C,"",colorwhite,64);
>
> [Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|