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

Re: [amibroker] How to combine Arrays? I am trying to calc stdev of H,L,C over 20 days



PureBytes Links

Trading Reference Links



Hi Ramon --

Try computing the standard deviation of each series separately, squaring each (those squared values are the variances), adding the variances, and taking the square root of the sum of the variances.  Is that the number that agrees with what you are looking for?

If not, look up the formula for computing the standard deviation of a series of number.  The program a for loop 20 days long.  Within the loop you will be processing three days points (HLC) every day instead of just one (C).

Thanks,
Howard
 

On Tue, Sep 8, 2009 at 7:01 AM, ramoncummins <ramoncummins@xxxxxxxxxxx> wrote:
 

Hi There

I am trying to calculate the standard deviation of the high,low and close prices for the last twenty days. In effect I wait the stdev of 60 pieces of data (20days * 3 data points). For reference, I am trying to replicate highlighting 60 cells in excel and calculating stdev on them.

I've thought about combing the h,l,c arrays but don't know how to do this.

Please note that neither of the following are correct:

stdev(H+L+C, 20);
(stdev(h,20)+stdev(l,20)+stdev(c,20) / 3); //this produces similar result but not *exactly* the correct result

Any help much appreciated.

Cheers

Ramon




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___