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 : Tuesday, January 15, 2008 5:36:24 PM(UTC)
JonRoberts

Rank: Advanced Member

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

I am trying to do a very simple exploration where I search for stocks where today's close is >= the close on a specific date in the past.

The exploration I have is:
-----------
m:=11;
d:=31;
y:=2007;

colA
C >= ValueWhen(1,Month()=m AND DayOfMonth()=d AND Year()=y,C);

Filter
colA
------------
Every security comes up with the error, "Filter reference to N/A value in column A."

I have searched the forums and have found other exploations where there was a search on dates in the past, and the same coding using ValueWhen was used. I've double checked to make sure I'm inputting a date for which there is a price and there is. So, for the life of me I can't figure out what's wrong.

Troubled and confused...
hayseed  
#2 Posted : Tuesday, January 15, 2008 6:36:15 PM(UTC)
hayseed

Rank: Advanced Member

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

hey jon..... your code looks ok ....... from your post it's not completely clear of the location of your m=11, d=31 and such.... it should appear as below.....h

//---------------


Exploration notes { i changed the date and < just as a check}

Col A:

m:=7;
d:=2;
y:=2007;

a:= ValueWhen(1,Month()=m AND DayOfMonth()=d
AND Year()=y,C);

C <= a


Filter colA

Filter enabled Yes
Periodicity Daily
Records required 32767

//---------------

JonRoberts  
#3 Posted : Tuesday, January 15, 2008 8:12:47 PM(UTC)
JonRoberts

Rank: Advanced Member

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

Hey, thanks for the quick reply Hayseed.

As a test, I copied and pasted your exact exploration and still received the same result...N/A value in column A.

I even ran the exploration on the entire NYSE ticker list, knowing that at least ONE stock had to close lower than 7/2/2007!

Upon looking at the Exploration Notes, mine is equivalent to yours, except it says Records Required: 1. So, here is exactly what I have at the moment.

ColA

m:=7;
d:=2;
y:=2007;

a:= ValueWhen(1,Month()=m AND DayOfMonth()=d AND Year()=y,C);

C <= a

ColB through Col F are blank

Filter
colA

Options
Exploration Date: Use most recent date
Periodicity = Daily
Use Filter is checked

I've also verified that I've downloaded daily quotes, rather than weekly.

???
hayseed  
#4 Posted : Tuesday, January 15, 2008 9:20:17 PM(UTC)
hayseed

Rank: Advanced Member

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

hey jon..... the number of records required did not occur to me but you got it..... except it says Records Required: 1....... records setting should be at least enough bars to cover the date..... so if your lookin back a year it would be approx the number trading days in a year.... 250 should cover it.... h
JonRoberts  
#5 Posted : Wednesday, January 16, 2008 4:55:32 PM(UTC)
JonRoberts

Rank: Advanced Member

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

Hey there Hayseed...

It took me a while to figure out how to tell it to load a certain number of records because all of my other explorations were set to "Load Minimum Records." I guess I've been lucky so far that I haven't needed to change the setting. But, it works great now, and as usual, I appreciate your help!

Jon
pumrysh  
#6 Posted : Thursday, January 17, 2008 10:59:47 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Jon,

November only has 30 days not 31.

Preston

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.