StockFetcher Forums · General Discussion · Followup on Need some help on 7/17 .... Help please<< 1 2 >>Post Follow-up
jmahon01
19 posts
msg #45965
Ignore jmahon01
7/19/2006 11:17:28 AM

Still trying to build and fine tune filter whereby I am wanting to select stocks which fluctuated by 10% in last 15 days OR fluctuated by more than 5 points in last 15 days. As stated in previous post responses ..... guess the OR clause has not yet been integrated into SF. So, was trying to do the workaround ..... but keep getting syntax errors . Here is the current clauses I am working with ..... can anyone tell me what I am doing wrong ???? Thanks/JPM

set{10hi,high 10 day high}
set{10lo,low 10 day low}
set{10range,10hi - 10lo}
set{10ratio,10range/close}
set{OR,count(10ratio greater than .10),1}
set{OR,count(10range greater than 5),1}
OR equals 1





nikoschopen
2,824 posts
msg #45968
Ignore nikoschopen
7/19/2006 12:04:34 PM

There's a bug in ure filter:

set{10hi,high 10 day high}
set{10lo,low 10 day low}
set{10range,10hi - 10lo}
set{10ratio,10range/close}
set{OR,count(10ratio greater than .10),1} ◄ syntax error!
set{OR,count(10range greater than 5),1} ◄ syntax error!
OR equals 1
______________

First, You may not use the same user-defined variable in more than one statement: "OR" is used in both lines 5 and 6.

Second, when using the "count" function, you must define the parameter inside the paranthesis [ie. count(abc is greater than xyz,1)]



jmahon01
19 posts
msg #45970
Ignore jmahon01
7/19/2006 12:20:45 PM

Thanks for responding Niko .... OK, so I understand the second point you have made ..... and how I need to do the parens ..... but how can I get around the first point ??? Essentially I want to select the stock on an "either/OR" basis. Either when the range is greater than 5 .... OR when the ratio is greater than .10. Thanks gain for helping/JPM


nikoschopen
2,824 posts
msg #45971
Ignore nikoschopen
7/19/2006 12:56:00 PM

set{OR1,count(10ratio greater than .10,1)}
set{OR2,count(10range greater than 5,1)}
set{OR,OR1 + OR2}
OR equals 1

Now that wasn't too difficult, was it? ;)


maxreturn
745 posts
msg #45972
Ignore maxreturn
7/19/2006 12:58:09 PM

If I'm not mistaken Niko you would probably want to state "OR above 0". The reason is that both conditions may be true in which case OR would equal 2.


jmahon01
19 posts
msg #45973
Ignore jmahon01
7/19/2006 1:06:41 PM

Thanks Niko and MAX .... appreciate the help ... sorry to be a pest ..... think also could use "OR >= 1" .... Right?


nikoschopen
2,824 posts
msg #45974
Ignore nikoschopen
7/19/2006 1:48:33 PM

maxreturn,

In that case, it would be considered "Both" rather than "Either/or", which jmahon01 has explicitly asked for.


jmahon01
19 posts
msg #45975
Ignore jmahon01
7/19/2006 1:54:52 PM

Hey Niko and Max .... me again. I put the logic in place we ended up with but when testing it .... I get some results I don't understand. Appreciate it if you could help. Here's the filter:

set{15hi,high 15 day high}
set{15lo,low 15 day low}
set{15range,15hi - 15lo}
set{15ratio,15range/close}
set{OR1,count(15ratio greater than .10,1)}
set{OR2,count(15range greater than 5,1)}
set{OR,OR1 + OR2}
Show stocks where OR >= 1

Question surfaces when I alter the last "OR" clause :

when I do "OR above 0" or "OR >= 1" the selection yields 506 stocks for either

but when I do "OR equal 1" the selection yields 757 stocks

My question is: Shouldn't the "OR equal 1" search have yield a LOWER number vs a HIGHER number ???

Appreicate any thoughts/comments you may have. /JPM



jmahon01
19 posts
msg #45977
Ignore jmahon01
7/19/2006 2:14:24 PM

Niko/Max ...Ignore my last. Don't know why .... but NOW when I do the "equals 1", I DO get the lesser selection which I had expected (200+). Maybe my PC system is not working right <frown>. Thanks again for your help.


maxreturn
745 posts
msg #45980
Ignore maxreturn
7/19/2006 3:28:46 PM

Niko, beg to differ. Why would you want to exclude any stocks that met both conditions?


StockFetcher Forums · General Discussion · Followup on Need some help on 7/17 .... Help please<< 1 2 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus