StockFetcher Forums · General Discussion · Need some help on a filter build<< >>Post Follow-up
jmahon01
19 posts
msg #45920
Ignore jmahon01
7/17/2006 10:59:28 AM

Any "filter expert" out there that could take a look at a filter clause that I am trying to build ..... and please tell me where I am going wrong ??? What I want to do is to focus on the "highest HIGH" of the last 15 days .... subtract from it the "Lowest LOW" of the last 15 days then divide by todays close (to get a decimal .... which I then compare to .10). Then, WITHOUT having created the decimal want to compare the previous simple subtraction result to $5. In "layman's terms" what I am looking for in this clause are those stocks that (in the last 15 days) have had fluctuations of either 10% OR greater than or equal to 5 dollars. The filter clause I am using at this point is as follows (but it doesn't seem to be working):

"and (max high last 15 days - Min Low last 15 days / close of today) >= .10 or (max high last 15 days - Min Low last 15 days) >= 5.00".

Appreciate any help to fine tune this one you may offer. Thanks/JPM



traderblues
195 posts
msg #45923
Ignore traderblues
7/17/2006 12:21:19 PM

Fetcher[set{15hi,high 15 day high}
set{15lo,low 15 day low}
set{15range,15hi-15lo}
set{15ratio,15range/close}
15range is above 5 or 15ratio is above 0.10
]




jmahon01
19 posts
msg #45925
Ignore jmahon01
7/17/2006 1:22:44 PM

Hey TraderBlues ..... Thanks much for the help. I will give it a try right now. /JPM



jmahon01
19 posts
msg #45926
Ignore jmahon01
7/17/2006 1:26:56 PM

Hey TraderBlues ..... when I built the "set clauses" into my filter .....SF gives me a syntax error on one of the clauses. It says "Variable '15range' did not evaluate". Any idea why I would be getting that? Thanks again for your help/JPM


jmahon01
19 posts
msg #45927
Ignore jmahon01
7/17/2006 1:33:04 PM

Whoops! ....think I found it ..... it wanted some spaces around the minus sign in the clause. Thanks again /JPM


nikoschopen
2,824 posts
msg #45929
Ignore nikoschopen
7/17/2006 3:22:44 PM

I also realized that TB used the boolean operator "or" in the filter. As far as I know, OR hasn't been implemented yet and StockFetcher will ignore it outright and calculate the two statements as conjunction rather than disjunction. Hence it would end up looking more like "Statement1 AND Statement2" rather than "Statement1 OR Statement2".


nikoschopen
2,824 posts
msg #45928
Ignore nikoschopen
modified
7/17/2006 3:49:22 PM

There should be a white space between the "-" operator, ie. set{15range, 15hi - 15lo}


[edit] Never mind. Being a lazy one, I merely skimmed ure posts only to find later that it has already been answered by the same questioner.


traderblues
195 posts
msg #45931
Ignore traderblues
7/17/2006 4:48:40 PM

nikoschopen,

I wasn't sure if OR worked yet or not. I think you're probably right. I've never used OR in one of my own filters.


nikoschopen
2,824 posts
msg #45932
Ignore nikoschopen
7/17/2006 5:12:26 PM

TB,

As such, we filter junkies have relied on other ways and means to bypass such a limitation. By all account, it's a messy way but it gets the job done all the same. (After all this time why SF has still yet to implemente this, along with IF conditional, is beyond me.)

For example, suppose I want to screen for stocks that either crossed above the previous day's high OR the MA(20):

Fetcher[
set{Xhi1, count(price crossed above high 1 day ago,1)}
set{Xma20, count(price crossed above MA(20),1)}
set{OR, Xhi1 + Xma20}
OR equals 1
]




StockFetcher Forums · General Discussion · Need some help on a filter build<< >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.