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

[amibroker] Re: Adjustable Bollinger Bands



PureBytes Links

Trading Reference Links

The moving average period is n.
Replace n=20 with n=21 to get the adjustment.
If you want envelope type other than BB, please specify the type you 
prefer and we shall check if the same procedure is possible.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Rick Osborn" <ricko@xxxx> wrote:
> Dimitris
> Very interesting.
> Is there a way to calculate the same thing using a 21-day moving 
average as the mid-point around which the adjustable bands move, 
rather than using BBands?
> Rick
> 
> ----- Original Message ----- 
>   From: Dimitris Tsokakis 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Friday, September 19, 2003 5:54 AM
>   Subject: [amibroker] Adjustable Bollinger Bands
> 
> 
> 
>   Paste in Inicator builder the
> 
>   // Adjustable Bollinger bands
>   n=20;
>   Lookback=100;
>   perc=95;
>   for(f=1.5;f<3;f=f+0.01)
>   {
>   bB=BBandBot(C,n,f);bT=BBandTop(C,n,f);
>   x=100*Sum(C>=bB AND C<=bT,Lookback)/Lookback;
>   if(x[BarCount-1]<=perc)
>   {
>   g=f;
>   }
>   }
>   newbB=BBandBot(C,n,g);
>   newbT=BBandTop(C,n,g);
>   newperc=100*Sum(C>=newbB AND C<=newbT,Lookback)/Lookback;
>   Plot(C,"",1,64);Plot(newbB,"",colorLightYellow,8);Plot
(newbT,"",colorLightYellow,8);
>   Plot(BBandBot(C,n,2),"",colorRed,1);Plot(BBandTop
(C,n,2),"",colorRed,1);
>   Title="f min="+WriteVal(g,1.2)+",perc="+WriteVal(newperc,1.0)+"%";
> 
>   The formula will find the f min necessary for the 95% confidence, 
>   will plot the new BBands and, for comparison, will plot the usual 
f=2 BBlines.
>   It is interesting to see fminCSCO=2.09 but fminBEAS=2.70.
>   You may adjust n, Lookback and perc.
>   Dimitris Tsokakis
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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 the Yahoo! Terms of 
Service.


------------------------ 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/