StockFetcher Forums · Filter Exchange · HELP/SOS/HELP<< >>Post Follow-up
greenbacksclub
10 posts
msg #42272
Ignore greenbacksclub
modified
3/20/2006 10:48:43 PM

I'm trying to create a filter that will find stocks ready for my entry requirements or somewhere thereabouts. I would appreciate any help anyone can give, I'll start with my method so you have an understanding of where I'm coming from. My method is obviously the opposite for bearish trades but right now we'll cover the bullish side. I trade options.

Basically I'm looking for uptrending or sideways trending stocks that have begun to experience a pull back, I'm looking for 4 consecutive lower closes/lows minimum to get on the watch list. I want to see the most recent close outside the lower bollinger band (20,2) or within a day or two of it, with; if possible a bottoming tail/wick.

I also use the CCI and RSI but I have those built in on my chart so I dont feel its necessary to add them to the filter.

I would enter at any price above the previous days close and set my stop at .10 below the previous days low. My profit target/exit is a quick and dirty 30% of my entry price (call option).

Thats pretty much it in a nutshell below is what I know was a noble effort on my part but unfortunately for me painfully lacking in both resources and technique. I have read the instruction manual for the screener but obviously have a long way to go. any help writing this screen so it actually gets some results as well as some possible backtesting help would be much appreciated.

show stocks where 52 week slope of close is above 0
and close above ma(20)
and average volume(30) is above 500000
and stock price is between 30 and 200
and stock is optionable
and close yesterday is below close 1 day ago
and close 1 day ago is below close 2 days ago
and close 2 days ago is below close 3 days ago
and close 3 days ago is below close 4 days ago
and closing price is nearing or below the lower bollinger band(20,2.0)

MANY THANKS






nikoschopen
2,824 posts
msg #42282
Ignore nikoschopen
3/21/2006 2:01:53 AM

How can you have a stock with "the most recent close outside the lower bollinger band (20,2) or within a day or two of it" and yet "(close) above ma(20)"? Hence I left "close above ma(20)" out of the equation although I had it drawn into the chart for reference. You might also lower or remove the price constraint, otherwise the filter yields too little results.


Fetcher[
set{down,count(close below close 1 day ago,5)}
set{out,count(low crossed below the lower bollinger band (20,2),2)}
set{down_and_out,down + out}
down_and_out above 5
close above PP

price is between 30 and 200
avgvol(30) is above 500000

draw ma(20)
draw bollinger band (20)
]




BFreshour
139 posts
msg #42288
Ignore BFreshour
modified
3/21/2006 9:20:43 AM

Here's my version of the filter, just decreased the price limitation, made sure the stock was optionable, and added a different volume filter used commonly on stock fetcher.

Fetcher[60 day slope of close above 0
set{down,count(close below close 1 day ago,5)}
set{out,count(low crossed below the lower bollinger band (20,2),2)}
set{down_and_out,down + out}
down_and_out above 5

price is above 5
set{dollarVolume, cma(volume, 30) * close}
dollarVolume > 500000
stock is optionable

set{stoploss,low - .10}
add column stoploss

draw ma(20)
draw bollinger band (20)
]






greenbacksclub
10 posts
msg #42292
Ignore greenbacksclub
3/21/2006 12:36:16 PM

Thanks very much!

It looks like I was way off base. I would like to have a similar filter for puts but obviously some of the settings need to change, looking at the way you designed the filter I cant figure out how to change things on my own. I would like to find stocks in a down trend/sideways trend with consecutive up days with the last day trading outside or near the upper bband. Is there another place yahoo group etc.. where I can get some more knowledge etc... on bldg these filters? Clearly the verbage you are using is a bit beyond whats covered in the manual.

Thanks again!


nikoschopen
2,824 posts
msg #42616
Ignore nikoschopen
3/28/2006 8:51:50 PM

I was hoping BFreshour would pick up the challenge of explaining the obscure language behind set statements, but since no reply came about I will offer my circuitous reply in the hopes that it would help you better understand.

First, refer to "New Feature: Advanced Screening Variables" for a quick pointer on user-defined variables.(http://www.stockfetcher.com/stockdb/fetcher?p=varhelp)

Second, search the forum for "Cegis" and read everything he has posted. I consider his posts as "The Complete Idiot's Guide To StockFetcher" *wink wink*



Having said that, let's chop & dice da filta

1. set{down,count(close below close 1 day ago,5)}
//Set statements work like algebraic formulas. You make your initial attack from the inside and work outward. Hence, we'll begin as thus:

1a. close below close 1 day ago
//self-explanatory

1b. count(close below close 1 day ago,5)†
//Literally, it means: within the past 5 days (referring to the number 5 at the right), how many times have the stock closed below it's prior day's close? The answer will vary between 0 and 5 (0 if the stock never once closed below yesterday's low and 5 if it closed higher for all 5 days).

†Note that the count() function requires both array (e.g., close) and the period to which the array must reference, and it must be enclosed within parantheses ().

1c. set{down,count(close below close 1 day ago,5)}
//Here, I have merely named 1b as "down"


2. set{out,count(low crossed below the lower bollinger band (20,2),2)}
//Ditto. Named as "out", the count() will return 0 (if low never crossed below the lower Bollinger band (20,2) within the last 2 days), 1 (if it crossed just once) or 2 (if crossed on both days).

3. set{down_and_out,down + out}
//Now I'm add "down" and "out". That is, of the numbers derived from each count(), I am asking for their sum. I know that the first count() will yield up to 5 and the latter will yield no more than 2, which means that I could have a figure as high as 7.

4. down_and_out above 5
//Since I know that the combined number from two count() will be no more than 7, I am adding a qualifier to the screening criteria that I want stocks with numbers 6 or 7.



You might ask why "above 5" and not any other arbitrary number? Well, I know that I could have a maximum of 2 from the second count(), but I also know that it's quite unlikely to have two consecutive days where prices will dive below the lower Bollinger bands only to close above it. Therefore, you'll probably end up getting 1 from the second count(), leaving the first() count to make up for the difference. Since my stipulation was that the total figure be 6 or 7, the first count() then must have 5. Even if the Bollinger band was violated twice, That would still leave 4 for the other count(), which means that there were 4 to 5 consecutive lower closes (including today's close) while the stock slipped below the Bollinger band only to regain its posture by the end of the bruising week. This was, after all, what I think you wanted in your original post.


WALLSTREETGENIUS
983 posts
msg #42618
Ignore WALLSTREETGENIUS
3/28/2006 9:25:29 PM

BFreshour? Yeah right!!! ROFLMAO!!!!!


greenbacksclub
10 posts
msg #42635
Ignore greenbacksclub
3/29/2006 6:53:55 PM

I appreciate you taking the time to help me out. I will absolutely look at all of "cegis" posts. I am still trying to figure out how to change the verbage to create a bearish filter using the same theme. consecutive up days outside upper band etc... but looking at the filter you posted (using the advanced filter variables) I am even more lost. Again I appreciate all the help!


nikoschopen
2,824 posts
msg #42639
Ignore nikoschopen
3/29/2006 9:54:16 PM

Some of the stocks don't quite make it up to the BB are elbowing themselves into the list of results. This is because the "above & beyond" is lowered to 4. In essence you're these stocks have risen for the last 4 days even though they failed to catapult above the upper BB line. If this bothers you, change it back to 5.

Better yet, just use the one below:

Fetcher[
set{above_,count(close above close 1 day ago,5)}
set{beyond,count(high crossed above the upper bollinger band (20,2),2)}
set{above_and_beyond,above_ + beyond}
above_and_beyond above 5
close below the upper bollinger band (20,2)

set{shooting_star,count(close below day position(0.4,1),1) * count(open below day position(0.4,1),1)}
set{hangman,count(close above day position(0.6,1),1) * count(open above day position(0.6,1),1)}
set{either_or,shooting_star + hangman}
either_or above 0

price is between 10 and 200
avgvol(30) is above 300000

draw ma(20)
draw bollinger band (20)
chart-time is 3 months
]


Here's another variation on the same theme:
Fetcher[
set{above_,count(close above close 1 day ago,5)}
set{beyond,count(high crossed above the upper bollinger band (20,2),2)}
above_ above 3
beyond above 0
close below the upper bollinger band (20,2)

set{shooting_star,count(close below day position(0.4,1),1) * count(open below day position(0.4,1),1)}
set{hangman,count(close above day position(0.6,1),1) * count(open above day position(0.6,1),1)}
set{either_or,shooting_star + hangman}
either_or above 0

price is between 10 and 200
avgvol(30) is above 300000

draw ma(20)
draw bollinger band (20)
chart-time is 3 months
]




nikoschopen
2,824 posts
msg #42637
Ignore nikoschopen
modified
3/29/2006 9:54:56 PM

Here's the same filter in reverse, namely, everything is turned on its head. Take note that the lower values were assigned to the new filter, however, since the above filter seemed too restrictive. Instead of 5 as the value of "down & out", I am giving it a 4 (in this case, "above & beyond"). Price and volume constraints are also lowered. Additionally, I'm including a couple more lines to make sure that the stock comes back below the Bollinger band, as well as have a long upper or lower wick (eg. hanging man or shooting star) to ensure that the damn reversal is around the corner. In sum, this filter will screen for stocks that have advanced for 3-5 days, during which time the close penetrated above the upper Bollinger band but have since fallen beneath it with either a hangman or shooting star formation. I should think this is enough to pass the litmus test. <grin>

Fetcher[
set{above_,count(close above close 1 day ago,5)}
set{beyond,count(high crossed above the upper bollinger band (20,2),2)}
set{above_and_beyond,above_ + beyond}
above_and_beyond above 4
close below the upper bollinger band (20,2)

set{shooting_star,count(close below day position(0.4,1),1) * count(open below day position(0.4,1),1)}
set{hangman,count(close above day position(0.6,1),1) * count(open above day position(0.6,1),1)}
set{either_or,shooting_star + hangman}
either_or above 0

price is between 10 and 200
avgvol(30) is above 300000

draw ma(20)
draw bollinger band (20)
chart-time is 3 months
]






greenbacksclub
10 posts
msg #42667
Ignore greenbacksclub
3/30/2006 11:28:29 PM

awesome! these will help me out so much for my short term plays. Thank you for all the help, I'll keep you posted on their successes:)


StockFetcher Forums · Filter Exchange · HELP/SOS/HELP<< >>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