Hmmm...once again, I'm not getting anything from this code. I just get a straight line going across.
--- In [email protected], "brian_z111" <[EMAIL PROTECTED]> wrote: > > //P_FixedStDev > > mean = MA(C,50); > lvmean = LastValue(mean); > sdmean = StDev(mean, 50); > top = LastValue(mean + sdmean); > bottom = LastValue(mean - sdmean); > > Plot(lvmean, _DEFAULT_NAME(),1,1); > Plot(top, _DEFAULT_NAME(),1,1); > Plot(bottom, _DEFAULT_NAME(),1,1); > > > --- In [email protected], "droskill" <droskill@> wrote: > > > > That solves some of it - so that gives me the upper and lower lines > > (over the entire range of the stock - not sure about that). But I > > need the line that represents the current standard deviation from a > > 50d moving average. > > > > Appreciate the help though - it's a good start for me. > > > > --- In [email protected], "wavemechanic" <timesarrow@> > wrote: > > > > > > Something along these lines should work: > > > > > > mean = cum(c) / (barcount -1); > > > lvmean = lastvalue(mean); > > > sdmean = stdev(mean, barcount -1); > > > top = lastvalue(mean + sdmean); > > > bottom = lastvalue(mean - sdmean); > > > > > > plot(lvmean, ... > > > plot(top, ... > > > plot(bottom, ... > > > > > > Bill > > > > > > ----- Original Message ----- > > > From: "droskill" <droskill@> > > > To: <[email protected]> > > > Sent: Thursday, March 20, 2008 12:14 PM > > > Subject: [amibroker] Standard Deviation as an indicator > > > > > > > > > > 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! > > > > > > > > > > > > ------------------------------------ > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > No virus found in this incoming message. > > > > Checked by AVG. > > > > Version: 7.5.519 / Virus Database: 269.21.7/1335 - Release Date: > > 3/19/2008 9:54 AM > > > > > > > > > > > > > >
