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

Notification

Icon
Error

Options
Go to last post Go to first unread
JonRoberts  
#1 Posted : Saturday, March 17, 2007 1:15:12 PM(UTC)
JonRoberts

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/22/2005(UTC)
Posts: 31

Downloader allows a person to create a composite security using only two securities. Is it possible to create a composite security in MS with > 2 securities? I know I could create an "indicator" by doing something like

x:= 0.5*Security(Path''SYMBOL1'',C) + 0.2*Security(Path''SYMBOL2'',C) + 0.6*Security(Path''SYMBOL3'',C)

but this would only give me the "close" for my composite security.

What I'd like to do is have a composite security with open, high, low, close, volume data when more than 2 securities are involved.

Ultimately, my goal here is to take the top 10 holdings in a mutual fund and create a "security" with open, high, low, close, volume data derived from those holdings, that will be representative of the mutual fund.

It SEEMS this would be rather straightforward, but after spending a couple of weeks trying various methods, reading my Metastock formula primer, and doing an internet search, I sure haven't been able to figure it out.

Thanks tons, everyone.

Jon
hayseed  
#2 Posted : Saturday, March 17, 2007 2:43:36 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey jon.... patrick's orignal forum dll had a composite creator.... however it also ploted as an indicator , which is not your goal.....

one solution could be thru the use of excel.... export the data to it, do the math, and import the combined data back ..... if your handy with excel.....

another simplier method would be to create your indicator in each of the o,h,l,c,v versions.... then plot each, right click and copy each plot..... paste into the proper column of your composites data sheet.... then your composite will plot normally.....

the formula below can be improved tremendously, but should give you an idea..... if the file path length becomes an issue, read the bottom part here about character hogs......h

----------------------------------------------

type:=Input("open,high,low,close,volume",1,5,1);


a:= .5* Security("C:\Metastock Data\nasdaq 100\amat",O ) + .3* Security("C:\Metastock Data\nasdaq 100\csco",O ) + .2* Security("C:\Metastock Data\nasdaq 100\aapl",O );


aa:=.5* Security("C:\Metastock Data\nasdaq 100\amat",H ) + .3* Security("C:\Metastock Data\nasdaq 100\csco",H ) + .2* Security("C:\Metastock Data\nasdaq 100\aapl",H );


aaa:=.5* Security("C:\Metastock Data\nasdaq 100\amat",L ) + .3* Security("C:\Metastock Data\nasdaq 100\csco",L ) + .2* Security("C:\Metastock Data\nasdaq 100\aapl",L );


aaaa:=.5* Security("C:\Metastock Data\nasdaq 100\amat",C ) + .3* Security("C:\Metastock Data\nasdaq 100\csco",C ) + .2* Security("C:\Metastock Data\nasdaq 100\aapl",C );


aaaaa:=.5* Security("C:\Metastock Data\nasdaq 100\amat",V ) + .3* Security("C:\Metastock Data\nasdaq 100\csco",V ) + .2* Security("C:\Metastock Data\nasdaq 100\aapl",V );


If(type=1,a,If(type=2,aa,If(type=3,aaa,If(type=4,aaaa,If(type=5,aaaaa,a)))))

-----------------------------------------------

Spaceant  
#3 Posted : Sunday, March 18, 2007 4:03:43 AM(UTC)
Spaceant

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/16/2005(UTC)
Posts: 182

Hayseed,

This is a smart way to do it that I have never thought of. However, it way eventually builds "indicators" with O, H, L, C & V individually, while you can't display a price chart, like what we can do for CandleStick or Bar chart.

It seems to me that MS has limitation in this area, like what I wanted to build two composites with same primary security, but failed - http://forum.equis.com/forums/thread/22156.aspx

Well I have tried the idea to buiild up one composite on another composite, but failed too. If it works, it can build up one composite in a stipud way based on aother nine composites in order to build a composite consisting of ten securities.

JonRoberts, apparently, you can only build one composite with two securities.

Regards,

Sa

JonRoberts  
#4 Posted : Sunday, March 18, 2007 7:16:53 AM(UTC)
JonRoberts

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/22/2005(UTC)
Posts: 31

Thanks so much, guys. When I was unable to figure out a relatively easy way to do what I was wanting, I HOPED I was simply missing something. :) Maybe having a more robust composite security creator is something the MS programmers could consider for a future version?

Jon
hayseed  
#5 Posted : Sunday, March 18, 2007 7:30:44 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey gary and jon..... yes it is a limitation..... an expanded composite feature allowing for more than just 2 and weights would be a simple matter for equis to include..... likely the only reason it is not included is due to not enough of us requesting it.... i've come to believe only a very small precentage of equis employees actually use metastock in the manner we do..... so our feedback/requests are important....

and of course very few boeing workers actually fly those 767's and very few gm workers drive a hummer......

we can still create a weighted composite and plot as any other security..... the initial start to finish time required for a 10 security weighted composite would run about 5 minutes..... it would have to be updated manually daily, which would take about a minute.....

all we would be doing is taking the data from each , o,h,l,c,v , indicator above and copy/paste each into the 'new composite security' s data sheet..... google has a free web based excel type program for those that do not have excel itself.... ......h

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.