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 : Friday, October 21, 2005 9:02:56 PM(UTC)
JonRoberts

Rank: Advanced Member

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

I am attempting to create a custom indicator and have run into a problem that I cannot resolve. I'm sure it's very simple, but the solution certainly escapes me. I've gotten a massive headache reading my MetaStock book and trying various combinations to make this thing work. I have created a security which I call NYSE-AD into which I insert data in the High, Low, and Volume columns. Note that the data has nothing to do with daily highs, lows, or volume, but since that's what MetaStock calls the columns, that's how I have to refer to them when developing a formula. Zeroes are in the Open, Close, and Open Interest columns. What I am trying to do is for each day, calculate a 5-day sum of the data in the High column, the Low column, and the Volume column, and plot that on a chart. The 5-day sum of the High and Low columns works fine, but the 5-day sum of the Volume column always shows as zero (0), even though there is data in that column. I have even tried moving the data in the Volume column into the Closed column and modifying my formula accordingly, but it still comes out to be zero. Any help as to why the 5-day sum of the Volume column always shows zero (0) would be GREATLY appreciated! Thanks in advance for your help! Jon Roberts The formula I have developed so far is (where SumH is supposed to be the 5-day sum of the High column, SumL is supposed to be the 5-day sum of the Low column, and SumV is supposed to be the 5-day sum of the Volume column): SumH := Security("C:\\FolderName\\NYSE-AD",H) + Ref(Security("C:\\FolderName\\NYSE-AD",H),-1) + Ref(Security("C:\\FolderName\\NYSE-AD",H),-2) + Ref(Security("C:\\FolderName\\NYSE-AD",H),-3) + Ref(Security("C:\\FolderName\\NYSE-AD",H),-4); SumL := Security("C:\\FolderName\\NYSE-AD",L) + Ref(Security("C:\\FolderName\\NYSE-AD",L),-1) + Ref(Security("C:\\FolderName\\NYSE-AD",L),-2) + Ref(Security("C:\\FolderName\\NYSE-AD",L),-3) + Ref(Security("C:\\FolderName\\NYSE-AD",L),-4); SumV := Security("C:\\FolderName\\NYSE-AD",V) + Ref(Security("C:\\FolderName\\NYSE-AD",V),-1) + Ref(Security("C:\\FolderName\\NYSE-AD",V),-2) + Ref(Security("C:\\FolderName\\NYSE-AD",V),-3) + Ref(Security("C:\\FolderName\\NYSE-AD",V),-4); SumH; SumL; SumV The data for the previous 5 days is in the Downloader as follows (so as you can see, the 5-day sum from the Volume column should be 5, not 0): 10/14/2005 0 2225.00 1059.00 0 1 10/17/2005 0 1762.00 1518.00 0 1 10/18/2005 0 918.000 2338.00 0 1 10/19/2005 0 2115.00 1155.00 0 1 10/20/2005 0 826.000 2453.00 0 1
Patrick  
#2 Posted : Friday, October 21, 2005 9:06:53 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Sorry, uninformed guess ... These symbols do not have volume ... Check the actual charts of the symbols you are talking about but they look like Market indices ( Advvance issues vs declining issues ) , I believe there is a specific symbol for advancing and declining volumes ... Sorry I can't really research this right now ... Let me know ... Patrick :mrgreen:
JonRoberts  
#3 Posted : Friday, October 21, 2005 10:22:55 PM(UTC)
JonRoberts

Rank: Advanced Member

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

Thanks Patrick. Since I do not subscribe to Reuter's DataLink, I'm not able to directly download the advancing/declining issues and total issues traded , but have to manually input them daily from Yahoo. Unfortunately, these aren't values that Yahoo has a ticker symbol with which they can be downloaded. Thus the reason for my creating a custom "Security" into which I manually input the advancing issues into the "High" column, the declining issues into the "Low" column, and the total issues traded into the "Volume" column. But, the problem is, for some reason my formula that is supposed to calculate the 5-day total of issues traded (i.e. 5-day sum of the "Volume" column), comes out with zero even though there is a value in the Volume column. Thanks so much! Jon
Patrick  
#4 Posted : Friday, October 21, 2005 10:27:57 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Well I don't see anything wrong in your formula so I'm voting for the data file :D Could you open NYSE-AD in the downloader ( File, open ... ) and do a screen capture for me ... Is it possible you imported the volume data in another column than the volume column? Patrick :)
JonRoberts  
#5 Posted : Saturday, October 22, 2005 12:45:06 AM(UTC)
JonRoberts

Rank: Advanced Member

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

Well Patrick, I have no idea what the deal was, but now it's working. I definitely had the data in the volume column. I had already checked that. I decided to just rebuild the Layout I was trying to make from scratch, and when I plotted the indicator, it worked like a charm. Very odd, but at least it's working now. Now I just wish I could find a free site to download historical advance/decline, new highs/new lows, and advancing/declining volume. Anyway, I appreciate your willingness to look at this for me! The few times I've asked for help in this forum, I have always found a lot of help very quickly. You have a great forum here! Jon
Patrick  
#6 Posted : Saturday, October 22, 2005 12:49:09 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
:eek: Glad you got it sorted ...
Quote:
You have a great forum here!
Thanks :D
henry1224  
#7 Posted : Saturday, October 22, 2005 12:55:29 AM(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)
you can change your formula to this SumH := Sum(Security("C:\\FolderName\\NYSE-AD",H),5); SumH;
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.