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

RE: [amibroker] Re: Sigma Bands



PureBytes Links

Trading Reference Links

Steve, Ara, Harvey,

You are right. The sigma lines are not Bollinger Band lines. The re 
read of the forex site description says "The three lines above and 
below this trendline are the 1, 2 and 3 standard deviations of the 
percent change of the actual data from the trendline". However, when 
I plot the standard deviation of the percent difference of the prices 
from the "long term trend line", the values plot almost right on top 
of the "long term trend line". 

Here is my latest interpretation. Use a MA for the Long Term 
Trendline. Use the last value of the standard deviation of the price 
to calculate 1,2,3 standard deviations from the Long Term Trendline. 
Plot the MA with those offsets.

Code below. Comments???

Bill

-------------------------------
Price = Close;

Plot(Price,"Price",colorBlack,4);
MAPrice = MA(Price,20);
Plot(MAPrice, "20 day MA",colorRed,4);

SD = LastValue(StDev(Price,20));
MAPriceP1 = MAPrice +SD;
Plot(MAPriceP1,"",colorBlue,4);
MAPriceM1 = MAPrice - SD;
Plot(MAPriceM1,"",colorBlue,4);

MAPriceP2 = MAPrice +2*SD;
Plot(MAPriceP2,"",colorGreen,4);
MAPriceM2 = MAPrice -2* SD;
Plot(MAPriceM1,"",colorGreen,4);

MAPriceP3 = MAPrice +3*SD;
Plot(MAPriceP3,"",colorOrange,4);
MAPriceM3 = MAPrice - 3*SD;
Plot(MAPriceM1,"",colorOrange,4);

--- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> wrote:
> Bill,
> 
> You may well be right, but the curves don't look anything like BB 
curves.
> Are you suggesting something different which I don't understand?
> 
> Steve
> 
> ----- Original Message ----- 
> From: "billbarack" <wbarack@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, February 11, 2004 3:43 PM
> Subject: [amibroker] Re: Sigma Bands
> 
> 
> > Steve,
> > The sigma bands are nothing but standard deviations above and 
below
> > the price action. One way to do this is with bollinger bands. Try
> > this: Make a custom indicator with price and 3 BBandTop functions 
at
> > 1, 2 and 3 standard deviations. Then do the same with the BBandBot
> > AFL function. I think you will find this to be what you want.
> >
> > Ask if you run into any difficulties.
> >
> > Bill
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> 
wrote:
> > > Has anyone managed to write the AFL code for Sigma bands? It 
seemed
> > simple, but was beyond me...
> > > Here is a reference:  http://www.forextrm.com/faq.htm and a 
picture:
> >
> >
> >
> > 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
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >



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