StockFetcher Forums · General Discussion · Specific Code for excluding a filter's results from another?<< >>Post Follow-up
starfox182
24 posts
msg #100704
Ignore starfox182
5/13/2011 12:32:38 AM

If you have a filter that gives you 50 results - Filter A let's call it
You also have a filter that gives you 10 results - Filter B let's call it

Most are Filter B's results are on Filter A.

How do I configure it to make it so Filter A excludes the results from Filter B?

Thanks!

four
4,003 posts
msg #100705
Ignore four
5/13/2011 12:49:37 AM

http://forums.stockfetcher.com/sfforums/?qrid=1305187355&mid=32279&isiframe=



starfox182
24 posts
msg #100706
Ignore starfox182
5/13/2011 1:47:13 AM

I read that thread and it just seemed to be about joining 2 filters together, but I may have understood it wrong. How do I exclude the results from one filter onto another?

Ex: Filter A has symbols: A, B, C, D, & E
Filter B has symbols: D & E

I want Filter A to show the results: A, B & C thus excluding Filter B



Kevin_in_GA
4,552 posts
msg #100708
Ignore Kevin_in_GA
5/13/2011 6:43:36 AM

You can do this the following way:

Say filter 1 screens for stocks that have a MACD that just crossed above 3

Fetcher[
show stocks where macd(12,26,9) crossed above 3
]



and filter 2 screens for stocks where the weekly MACD has also just crossed above 3

Fetcher[
show stocks where weekly macd(12,26,9) crossed above 3
]



You want stocks that meet the first condition (or set of conditions) from filter 1, but not those that also meet the conditions for filter 2.

For this example you can simply say the following

Fetcher[

set{condition1, count(macd(12,26,9) crossed above 3, 1)}
set{condition2, count(weekly macd(12,26,9) crossed above 3,1)}
set{condition3, condition1 * condition2}

condition1 above 0.5
condition2 below 0.5

]



The example above hows you the syntax one can use. In this case it is straightforward because I am only looking at a single condition. To link multiple conditions together, you use a set statement with the count function (as I did here) and simply multiply all of the individual elements together in sequence to get a final set variable that will be either a 1 or 0 (if all conditions are met or not).



starfox182
24 posts
msg #100712
Ignore starfox182
5/13/2011 9:16:32 AM

Thanks!!!!! :)

mohk1234
1 posts
msg #100944
Ignore mohk1234
5/28/2011 1:40:21 AM

Hello Kevin_in_GA, I have been following all your posts and screens. I was hoping to chat with you for a sec. Can you contact me on my email at mohinvest@gmail.com?

Thanks!

StockFetcher Forums · General Discussion · Specific Code for excluding a filter's results from another?<< >>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