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

[amibroker] Re: Standard Deviation as an indicator



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "droskill" <droskill@xxx> wrote:
>
> Hey all - I'm trying to put together an indicator based on Standard
> Deviation.  The difference, from, say Bollinger Bands in this case is
> that I want to show the Std Dev from a moving average in terms of 1,2
> and 3 standard deviations from mean, where mean is an N day moving
> average.  So, the mean would be represented by a constant straight
> line on a chart, and then a line would go up/down around it.
> 
> For an example, check this out:
>
http://www.indexindicators.com/charts/sp500-vs-sp500-50d-rsma-params-3y-x-x/
> 
> I really don't know how to approach this - anybody have any
> thoughts/ideas?  Or maybe someone has done it before (or it's in AB
> already) and I just haven't found it.
> 
> Thanks!

I think %b is what you want. 

%b = (last - lowerBB) / (upperBB - lowerBB)

(%b is derived from the formula for Stochastics.)

Using the standard BB parameters of +/- 2 sd:

+2, %b = 1.0
+1, %b = 0.75
 0, %b = 0.5
-1, %b = 0.25
-2, %b = 0.0

If you need centered numbers you can subtract 0.5 from %b and multiply
the result by two, or whatever constant suits your ap. Again using the
defaults of +/- 2 sd:

%b_norm = (%b - 0.5) * 2.0

Which would give:

+2, %b =  1.0
+1, %b =  0.5
 0, %b =  0.0
-1, %b = -0.5
-2, %b = -1.0

Or, again sing the default parms od +/1 2 sd, multiplying by 4 would
give you the intuitive number you seek:

+2, %b =  2.0
+1, %b =  1.0
 0, %b =  0.0
-1, %b = -1.0
-2, %b = -2.0

Enjoy,

    jab
www.bbands.com



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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