Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/22/2005(UTC) Posts: 31
|
After much head scratching, forum research, MetaStock Formula Primer research, and general frustration, I find I must seek help from the experts.
When downloading large ticker lists from Yahoo!, you can get stocks that may only have one data point in them or stocks for which the last data point was far in the past. For instance, I recently downloaded data for a large number of tickers from the OTC market. Two examples will show what I'm trying to filter.
Setting up my stock price downloading program to download from 1/1/2000 to 12/27/2007 resulted in the following two (among many similar) outputs:
AAAC.OB had data only from 5/1/07 to 10/4/07 AAACE.OB had one data point--8/22/07
Clearly, these are two stocks that I'd prefer to filter out when running an exploration.
I thought one way to do this would be a 2-step process:
1. Filter out stocks for which there is only one data point (as in AAACE.OB). 2. Filter out stocks for which the last data point is "x-days" in the past from today's computer date.
It seems to me, the 2nd filter could use the "lastvalue" function to say, "If the computer date minus the lastvalue of the date for the security is > 5, then don't run the exploration on that security." In other words, for data more than 5 days old, skip that security and go to the next one.
My problems are, I can't figure out how to have a check for "firstvalue" of the security date <> "lastvalue" of the security date (to filter out example 1) and I can't figure out how to have it check a security date with the computer date (to filter out example 2).
I hope this makes sense, and as always, I appreciate your help!
Jon
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/5/2006(UTC) Posts: 129 Location: Norgate Data
|
1. CUM(1) > 1 2. MetaStock has no way of knowing today's date... so I developed a plugin to do exactly what you want. See: http://www.tradernexus.com/nexusdate/ with a filter of ExtFml( "NexusDate.DaysOld") < 5
Best of all it's free! Happy new year.
Cheers, Richard.
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/22/2005(UTC) Posts: 31
|
Wow, thanks Richard. That is awesome! Exactly what I was needing!!!
Happy New Year to you, too!
Jon
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 7/1/2007(UTC) Posts: 33
|
Hi Richard,
About your plugin, can it be use when the exploration periodicity is set to
weekly or monthly ?
ExtFml("NexusDate.DaysOld") < x
where x = 5 for weekly & x = 20 for monthly timeframe ?
Please advise. Thank you
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/5/2006(UTC) Posts: 129 Location: Norgate Data
|
The plugin works on the difference between today's date and the date of the last bar on the security.
So, yes, you could use it on weekly and monthly explorations.
Why not write an exploration with just: ExtFml("NexusDate.DaysOld") in one of the columns and see what values it shows for weekly and monthly and choose values that are suitable for that.
|
|
|
|
|
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.