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

[amibroker] Re: What is Correlation



PureBytes Links

Trading Reference Links

They don't return the same number.

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxx> wrote:
>
> Hello,
> 
> Built-in correlation is calculated according to this formula:
> 
>  
> 
> 
> See also http://en.wikipedia.org/wiki/Correlation
> 
> It can be re-coded in AFL as:
> 
>   
> function Correl( x, y, number )
> {
>  nom= MA( x * y, number ) - MA( x, number ) * MA( y, number );
>  denom = sqrt( MA( x ^ 2, number ) - MA( x, number ) ^ 2 ) *
>  sqrt( MA( y ^ 2, number ) - MA( y, number ) ^ 2 );
>  return nom/denom;
> }
> 
> Graph0=Correlation( C, Ref( H, -2 ), 10 ); // built-in
> 
> Graph1=Correl( C, Ref( H, -2 ), 10 ); // re-coded;
> 
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> 
> ----- Original Message ----- 
> From: "Graham" <kavemanperth@xxx>
> To: "amibroker" <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, March 09, 2006 8:29 AM
> Subject: [amibroker] What is Correlation
> 
> 
> > Can anyone tell me what Correlation is actually calculating
> > I have read the description in help files but am still confused what
> > it is actually calculated.
> > In what way is it actually comparing the 2 arrays.
> > 
> > --
> > Cheers
> > Graham
> > AB-Write >< Professional AFL Writing Service
> > Yes, I write AFL code to your requirements
> > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > 
> > 
> > 
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> >
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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/