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

[amibroker] Re: channel width, in dr. elder's sense



PureBytes Links

Trading Reference Links

Hi ,
This is what I use for the triple screen, it allows you to adjust the 
envelope to each stock or future.

sp = Param( "pds1 Period", 13, 2, 100 );
r = EMA(C, sp );
Plot( r, "EMA("+WriteVal(sp,1.0)+")", ParamColor("pds1 Color", 
colorGreen ) ); 

s = Param( "pds2", 26, 2, 100 );
m = EMA(C, s );
Plot( m, "EMA("+WriteVal(s,1.0)+")", ParamColor("pds2Color", 
colorRed ) ); 

x= Param( "cond1", .091, .01,1,.001 ); 
cond1= EMA(C,13)+EMA(C,13)*x;
Cond2= EMA(C,13)-EMA(C,13)*x;
 
Plot(C, "Price",colorYellow, styleBar );
Plot(cond1,"upper band",ParamColor("",colorBlue),1);
Plot(cond2,"Lower band",ParamColor("",colorBlue),1);



Enjoy,
Dennis



--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
> does anyone know how to automatically calculate channel (envelope) 
widths
> like dr. elder intends? far as I can tell, this is idiosyncratic to 
him;
> everywhere else I've found references to channels, they just mean 
the
> general idea of constant ratio above and below an EMA.
> 
> here's what he says in Come Into My Trading Room:
> 
> ----------
> Upper channel line = EMA + (EMA * Channel coefficient)
> Lower channel line = EMA - (EMA * Channel coefficient)
> 
> A well-drawn channel contains the bulk of prices, with only a few 
extremes
> poking out. Adjust the coefficient until the channel contains 
approximately
> 95 percent of all prices for the past several months. 
Mathematicians call
> the "second standard deviation channel". Most software packages 
make this
> adjustment very easy.
> ----------
> 
> I don't know how to turn the reference to standard deviation into 
code. he
> specifically contrasts channels to Bollinger Bands, which are 
plotted some
> number of standard deviations away from the EMA.
> 
> anyone understand this better than me?
> 
> dave


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/