PureBytes Links
Trading Reference Links
|
Good Piece of work Ed
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 --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
|