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

[amibroker] Help please ... How to code correlation of index to share



PureBytes Links

Trading Reference Links




Hi folks. 
 
Got stuck with AFL ...
 
Lets say I have several groups set up, and each 
group contains a bunch of shares, plus a corresponding index. For 
example:
 
Group    Shares    
                
    Indice
<FONT face=Arial 
size=2>1            30 
Dow shares            
^DJI
2        
    100 Nasdaq 
shares      ^NDX
3        
    100 FTSE shares        
^FTSE
4        
    30 german shares        
^GDAXI
 
How can I set up an indicator that will plot the 
correlation of the current share to the indice associated with that shares 
group? For example:
 
corr=(c,close from index in current share's 
group);
<FONT face=Arial 
size=2>plot(corr,"correlation",colorblack,styleline);
 
Any sneaky way to code this without using 20 
nested iif's? I have 20 groups....
 
 
Thanks,
 
Andy






Yahoo! Groups Sponsor












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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.