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...
|
|
|
|
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
//---------------
|
|
|
|
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.
???
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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.