[amibroker] Cant get Moving Average of an Index to work [1 Attachment]

 
[Attachment(s) from pauldavey@live.com.au [amibroker] included below]

I am trying to get the 220 day Moving Average of the Australian Share XAO index, I run an Explore on the ASX using the code below the   Index = Foreign("XAO","C",1);  works fine it gives me the correct value of the XAO and it is the same value for every symbol , but I expected    IndexMA = MA (Index, 220);   to give me the same value for every symbol since it is based on the XAO not the symbol but it is a different value for each symbol. I have attached an Excel spreadsheet showing the result notice IndexMA has a different value for each symbol. Thanks for any help.



Filter = ( C>0.01 );


Index = Foreign("XAO","C",1);

IndexMA = MA (Index, 220);


AddColumn(Index, "Index" );

AddColumn(IndexMA, "IndexMA" );


__._,_.___

Attachment(s) from pauldavey@live.com.au [amibroker] | View attachments on the web

1 of 1 File(s)


Posted by: pauldavey@live.com.au
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

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


.

__,_._,___


EmoticonEmoticon