StockFetcher Forums · General Discussion · What is wrong with this filter?<< >>Post Follow-up
nikoschopen
2,824 posts
msg #33065
Ignore nikoschopen
8/30/2004 9:08:55 PM

The following filter is taken from the example given in the New Feature: Count() of the Announcement forum (http://www.stockfetcher.com/stockdb/fetcher?p=forum⊂=view&fid=1004&tid=27374). The parameter has been modified from RSI to Stochastics while others have been left intact, yet it results in zero matches.


Fetcher[
set{var1, count(Slow Stochastics(7,3) Fast %k crossed below 30, 45)}
set{var2, count(Slow Stochastics(7,3) Fast %k crossed above 70, 45)}
set(sum1, var1 + var2}
set{ratio2, sum1 / 45}
show stocks where ratio2 is above 0.75

add column ratio
]



Just to reiterate what's already been said from the Announcement, I'm looking for stocks with the slow Stochastics(7,3)


nikoschopen
2,824 posts
msg #33066
Ignore nikoschopen
8/30/2004 9:11:11 PM

The following filter is taken from the example given in the New Feature: Count() of the Announcement forum (http://www.stockfetcher.com/stockdb/fetcher?p=forum⊂=view&fid=1004&tid=27374). The parameter has been modified from RSI to Stochastics while others have been left intact, yet it results in zero matches.


Fetcher[
set{var1, count(Slow Stochastics(7,3) Fast %k crossed below 30, 45)}
set{var2, count(Slow Stochastics(7,3) Fast %k crossed above 70, 45)}
set(sum1, var1 + var2}
set{ratio2, sum1 / 45}
show stocks where ratio2 is above 0.75

add column ratio
]




Just to reiterate what's already been said from the Announcement, I'm looking for stocks with the slow Stochastics(7,3) that has spent more than 75% of the time either above 70 or below 30 within the last 45 days...

Thx for any advice.


cegis
235 posts
msg #33069
Ignore cegis
8/31/2004 9:34:11 AM

nikoschopen,

The reason you get no results is that no stocks match the criteria! They way I figured that out is I ran a filter just using the first count() in your filter, with the condition that the count() is greater than 8. One stock matched. (I actually used trial and error to see what the highest count() greater than zero is.) I then ran the second count() looking for the count greater than 7 (again using trial and error). Two stocks matched, and they were different than the one that matched in the first test. No stocks matched the count()s when comparing to 9 or 8, respectively.

Even if one of the stocks matched both count()s, (8 + 7) / 45 (i.e., ratio2) is much less than 0.75.

It's difficult to tell why a filter returns no results, as it could be no matches (as in this case), or that SF doesn't "understand" the filter due to a typo or some such. The way to figure out what is goin on is to "pick it apart", as I did here. That usually gets me to the root of the issue pretty quickly.

HTH,

C


nikoschopen
2,824 posts
msg #33076
Ignore nikoschopen
8/31/2004 7:35:33 PM

Cegis,

thx for the response. I too have manually manipulated different parameter to see whether any stocks might come up. For instance, the days count() was changed incrementally from 45 to 90, and the ratio was reduced to .50, but I still wasn't able to make either heads or tails about what the problem was. My lack of understanding, I s'pose :)


cegis
235 posts
msg #33084
Ignore cegis
9/1/2004 9:35:41 AM

nikoschopen,

Glad I could help.

One thing I'd like to make clear, though. Manipulating the parameters as you say you did is different than what I did to determine no stocks matched. You modified how stocks were selected. I looked at the result of the parts of the filter to see if "expected" results were returned. Both ways are "valid" debugging methods, but I'd suggest that you should have first tried checking for ratio2 greater than zero, so you could see what ratio values you were getting.

My point is, to debug a filter quickly, first inspect actual values and see how they compare to what you expect. (In other words, remove selection conditions.) That will frequently point you to the reason why a filter returns no results.

HTH,

C


nikoschopen
2,824 posts
msg #33090
Ignore nikoschopen
9/1/2004 7:23:54 PM

Cegis,

thx for your suggestion. I'm not too sure at this point in time that to conceptualize as such is remotely possible...I'm merely struggling with grasping such basic principles :)

Be that as it may, would you mind walking me thru another (yet simple?) filter that I have in mind. What I have in mind are the following conditions:

-- a stock has been advancing for 3 of the past 5 days (ideally the last day's close should be higher than the close 5 days ago)

-- slow stochastics (7,3) fast k% has advanced but remains below 60

-- slow stochastics (7,3) fast k% has made a "U-turn" within the past 2 days, namely, fast k% reversed course and crossed below slow k%

-- the EMA(17) of the CCI(5) reading is trending down

(How would you build a filter using set() and count() parameters to get the results?)

What I'm basically looking for is a continuation of the trend, after a few days of correction, wherein a stock has been trending up for 3 or more days only to reverse course and hopefully tank (hmm, that sounds nice, haha). The overall trend is verified with the EMA(CCI(5),17).

To minimize any frustration, I ask you to look at Amgen (AMGN) between 2/23/04 - 3/15/04.

thx again

niko


cegis
235 posts
msg #33095
Ignore cegis
9/2/2004 9:26:49 AM

niko,

I'm happy to help, but you leave a few details to my imagination. Here are the questions I have:

- Condition 1 is simple, but condition 2 and 3 seem contradictory in some ways. What do YOU consider an "advance" in condition 2? Just value 5 days ago < value today? Slope of value over 5 days > 0? Something else? How does the "U-Turn" come into play with the advancement?

- For condition 3, to satisfy "U-Turn", do you mean that value 2 days ago > value today? Or, value decreased on either of the two days? Or, some combination?

The rest is fairly straight forward. I'm gonna ask that you give writing the filter a shot, and post what you come up with. If you're not getting expected results, state - precisely - what seems amiss. If there's a specific condition you're having trouble writing, let me know, and state what you think you need to do.

The best way to learn how to write filters is to write them. Give it a go!!

C

Hint: MOST of the conditions do not require set{}. Condition 2 MAY.


StockFetcher Forums · General Discussion · What is wrong with this filter?<< >>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