logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ankur_chops  
#1 Posted : Sunday, August 5, 2012 1:50:16 AM(UTC)
ankur_chops

Rank: Member

Groups: Registered, Registered Users
Joined: 8/5/2012(UTC)
Posts: 16

Hi,
please help me with this query.
How to get difference between 2 Stocks in Metastock 9.
For example: if there are 2 stocks "A" and "B"
I want to plot a chat showing the difference ( their LTP or closing prices) between these 2 stocks, A and B .
It should be really simple, but I am missing out somthing, Please help.

Thank
AC
haddison  
#2 Posted : Sunday, August 5, 2012 7:21:28 AM(UTC)
haddison

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/6/2010(UTC)
Posts: 113
Location: London

Have a look at the Security() function. Best regards. haddison
ankur_chops  
#3 Posted : Monday, August 6, 2012 7:56:18 AM(UTC)
ankur_chops

Rank: Member

Groups: Registered, Registered Users
Joined: 8/5/2012(UTC)
Posts: 16

thanks a lot Haddison for reply....
Security function is of g8 help.
But I want to generalize it, so that if there are 2 securities in my chart and I want to display the difference between then as an indicator , how to do it? ( currently I am now able to do for fixed securities, adding them in indicator builder)
henry1224  
#4 Posted : Monday, August 6, 2012 12:50:43 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Code:
A:=security("C:Metastock Data\Msft",ROC(C,10,%));
 B:=security("C:Metastock Data\Dell",ROC(C,10,%));
 A-B


Sorry, but you have to spell out the security

or you can change the name of A to represent an index and use the ROC(C,10,%) to represent the other , that way you compare a security against an index
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.