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

[amibroker] Re: channeling stocks



PureBytes Links

Trading Reference Links


I think this is pretty close.

// LISTING 1
// plot candlestick price chart
Plot( Close, "Price", colorBlack, styleCandle );
GraphXSpace = 1;

// define TAM chart period
//period = 25; 
// users of AB Version 4.30 can use Param
period = Param( "TAM period", 25, 2, 100, 1 );

halfperiod = floor( period /2 );

// minor term average
Arm = MA( Close, period );

Plot( Arm, "Minor term avg", colorRed );

// calculate volatility
yom = 100 * ( C - Ref( Arm, halfperiod ))/Ref( Arm, halfperiod ); 
avyom = MA( yom, 2 * period );
varyom = MA( yom * yom, 2 * period ) - avyom * avyom;
som = Ref( sqrt( varyom ), -halfperiod );
sigom = MA( som, period );

// plot reference price grid
Plot( Arm * ( 1 + 0.01 * sigom ), "Ch+1", colorLightGrey );
Plot( Arm * ( 1 - 0.01 * sigom ), "Ch-1", colorLightGrey );
Plot( Arm * ( 1 + 0.02 * sigom ), "Ch+2", colorLightGrey );
Plot( Arm * ( 1 - 0.02 * sigom ), "Ch-2", colorLightGrey );
Plot( Arm * ( 1 + 0.03 * sigom ), "Ch+3", colorLightGrey );
Plot( Arm * ( 1 - 0.03 * sigom ), "Ch-3", colorLightGrey );

















--- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
> hello,
> 
> does anyone know the algorithm they use to create they channels 
(see stockcharts on the site below)
> 
> http://contrarians.blogspot.com/2005_01_12_contrarians_archive.html
> 
> 
> rgds, Ed





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/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/