PureBytes Links
Trading Reference Links
|
There may be many much more elegant solutions but this will get you where you want to go.
1. Choose the index you want to use as the reference point. Let's assume for instance if it is the Nifty
So you use the setforeign command to put that in place. Exact syntax you will get from the manual. If it does not work I will work with you to get it going. Give it a shot by yourself first.
2. Now the daily change you will get using ROC function.compute the ROC for the the index.
3. Compute the ROC for each individual ticker/stock in your database again using ROC.
Once you have the values in 2 and 3 it is simply a subtraction/addition operation.
Rakesh
On 20 Mar 2007 06:47:31 -0700, Vinay Gakkhar. <vgakkhar@xxxxxxxxxxx
> wrote:In Automatic Analysis, I want to set a formula where I can add the difference of that particular scrip's % change with the index's % chang to the day's close price of EVERY scrip.
Example: suppose the day's closing price of scrip A is 27.50, its %Change is 2.1%, and the index Nifty's % change is 2.3%, I want to get the result (27.50 + (2.3-2.1) % of 27.50).
At the same time, suppose the day's closing price of scrip B is
127.50, its %Change is 2.2%, and the index Nifty's % change is 2.3%, I want to get the result (127.50 + (2.3-2.2) % of 127.50).
I am not so literate in the AFL language, also despite having read help menu I have not been able to understand how to do it.
Can you help?
Best regards,
gakkhar
___________________________________________________________ All New Yahoo! Mail ? Tired of Vi@xx@! come-ons? Let our SpamGuard protect you.
http://uk.docs.yahoo.com/nowyoucan.html
------------------------ Yahoo! Groups Sponsor --------------------~--> Transfer from your equities account. Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/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/
__._,_.___
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
SPONSORED LINKS
__,_._,___
|