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

Re: [amibroker] Re: 95% Channel formula



PureBytes Links

Trading Reference Links

Chris,

Try this formula:

//Percent envelopes

pds =Param("periods", 20,10,40,1);

percent=Param("Percent",95,10,100,5);



Value2=Sum(HHV(H,pds),pds)/pds;

Value3=Sum(LLV(L,pds),pds)/pds;

range=Value2 - Value3;

shift = range * (PerCent / 100);



avg1=Sum(EMA(C,pds),pds)/pds;

avg2=avg1+shift;

avg3=avg1-shift;

topband=avg2;

midline=avg1;

botband=avg3;

Plot(C,"Close",colorBlack,styleCandle);

Plot(topband,"tobBand",colorRed,styleLine);

Plot(midline,"Midline",colorYellow,styleLine);

Plot(botband,"BotBand",colorRed,styleLine);

Title=Name()+"...Percent of enclosure = "+WriteVal(percent,1)+" % based on
"+"[ "+WriteVal(pds,1)+" ]"+" Periods"+"\n"+"Topband =
"+WriteVal(topband,format=1.2)+"\n"+"Midline = "
+WriteVal(midline,format=1.2)+"\n"+"BotBand = "
+WriteVal(botband,format=1.2)+"\n"+"Todays Close = "
+WriteVal(C,format=1.2);



Anthony

----- Original Message ----- 
From: "indiana0352" <cs_winn@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, September 19, 2003 4:54 PM
Subject: [amibroker] Re: 95% Channel formula


> The lines are not straight and therefore are not parallel.  They
> move up and down every day and will in fact look exactly like the MA
> because thats what they're based on.
>
> I have the formula in Amibroker already and the channels it creates
> look quite nice and work well in both uptrends and downtrends.  It's
> just that I have to adjust the coefficient manually and eyeball what
> looks like 95% of prices.
>
> I'm sure there is a way of mathematically calculating this formula...
>
> Chris
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "sloughbridge" <sloughbridge@xxxx>
> wrote:
> > --- In amibroker@xxxxxxxxxxxxxxx, "indiana0352" <cs_winn@xxxx>
> wrote:
> >
> > > Thanks for the info.  I'm not using Boll Bands simply because
> Elder
> > > says they're not based on volatility as BBands are.  Elder feels
> > > that channels are more appropriate for stock trading because
> they
> > > give former price targets when channel trading.
> > >
> > > This seems reasonable to me but I wanted to see for myself.
> >
> > I believe if there were a formula to plot an MA and 2 equidistant
> > parallel bands, within which would fall 95% of prices, he would
> have
> > provided it.
> >
> > You know what price trends look like, and how volatility ebbs and
> > flows as that trend develops.  Can you imagine parallel lines
> > surrounding a single MA containing a fixed percentage of the price
> > action?
>
>
>
> 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/
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/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/