StockFetcher Forums · Filter Exchange · how to create 4x2 type of filter<< >>Post Follow-up
sbuck143
88 posts
msg #88967
Ignore sbuck143
3/2/2010 3:53:24 PM

I am new to stockfetchers but am quite impressed with the functionality.

I am trying to create a simple filter based on the "4x2" concept.......the key tenets being:

1) The stock has experienced exactly 4 consecutive down days
2) followed by a sell signal when 2 up days are seen after #1 has occurred.

I found the default consecutive down day filter off the examples page (modified for 4 days):

Fetcher[Show stocks where Close has been decreasing over the last 4 days
and Average Volume(90) is above 50000
and close is between 1 and 250
]




but that returns all stocks where the close has been decreasing for 4 or more days. So it pulls out stocks with 5, 6, 8, 10+ down days! I want it to just be exactly 4 days, no more and no less.

Try as I might I can't find the magic combination of phrases to get it to do this.

Any help would be much appreciated.

Radiomuse
288 posts
msg #88971
Ignore Radiomuse
3/2/2010 4:20:30 PM

You can just add a line like this...

close 5 days ago > open 5 days ago



sbuck143
88 posts
msg #88972
Ignore sbuck143
3/2/2010 4:39:30 PM

woohoo! The magic phrase found!

four
3,999 posts
msg #88981
Ignore four
modified
3/3/2010 12:30:59 AM

Fetcher[
show stocks where the close 6 days ago > open 6 days ago

show stocks where the count(close 2 days ago below open 2 days ago,4) equals 4

show stocks where the count(close above open,2) equals 2
]



Comments:

0. Start with 1 white candle

1. The stock has experienced exactly 4 consecutive down days (4 red candles)

2. followed by a sell signal when 2 up days are seen after #1 has occurred. (2 white candles)

-------------------------------------------

Fetcher[

show stocks where the close 6 days ago > open 6 days ago

show stocks where the count(close 2 days ago below close 3 days ago,3) equals 3

show stocks where the count(close 2 days ago below open 2 days ago,4) equals 4

show stocks where the count(close above open,2) equals 2
]



Comments:

Do you see the difference between the two filters?
The second filter includes... the close of the red candle is below the previous red candle.

four
3,999 posts
msg #88983
Ignore four
3/3/2010 1:19:01 AM

Fetcher[

show stocks where the close 6 days ago > open 6 days ago

show stocks where the count(close 2 days ago below close 3 days ago,3) equals 3

show stocks where the count(close 2 days ago below open 2 days ago,4) equals 4

show stocks where the count(close above open,2) equals 2

show stocks where the count(close above close 1 day ago,1) equals 1
]



This filter provides...

4 red candles followed by 2 white candles
4 red candles with lower closes and 2 white candles with higher closes

Radiomuse
288 posts
msg #88988
Ignore Radiomuse
3/3/2010 3:44:28 AM

Thanks for the coding tips Four!

sbuck143
88 posts
msg #89035
Ignore sbuck143
3/3/2010 10:59:46 PM

from four:

Fetcher[

show stocks where the close 6 days ago > open 6 days ago

show stocks where the count(close 2 days ago below close 3 days ago,3) equals 3

show stocks where the count(close 2 days ago below open 2 days ago,4) equals 4

show stocks where the count(close above open,2) equals 2

show stocks where the count(close above close 1 day ago,1) equals 1
]




This filter provides...

4 red candles followed by 2 white candles
4 red candles with lower closes and 2 white candles with higher closes



*********************************************************************************************************



So if I wanted to backtest this filter, I'd have to separate the red candle part (the stuff up to the last two lines),
and then put the last two lines in the exit filter, right?

sbuck143
88 posts
msg #89111
Ignore sbuck143
modified
3/4/2010 10:28:46 PM

okay i'm having a devil of a time trying to break the provided filters down into just a "4 down day" filter.


I would like to backtest this, and to the best of my knowledge the only way to do this would be to have a filter with only the 4 consecutive down days, and then in the backtest area, have the 2 Up candles as the exit criteria.

But my attempts to reverse engineer the formula are failing somewhere:


Help :(


+++++++++++++++++++++++++++++++++++++++++++++++++++++
Edit:

I think I got it:


show stocks where the close 4 days ago > open 4 days ago

and where the count(close is below close 1 days ago,4) equals 4

and where the count(close is below open,4) equals 4




used with the two up day higher close criteria (nice addition btw), and a 10% stop loss its generating a decent return in backtesting!



four
3,999 posts
msg #89118
Ignore four
3/4/2010 11:32:18 PM

good luck and let us know the results

ns90212
3 posts
msg #89178
Ignore ns90212
3/5/2010 4:44:58 PM

Fetcher[Show stocks where Close has been decreasing for 4 days lag 2 days
and close has been increasing for 2 days
and Average Volume(90) is above 50000
and close is between 1 and 250
]



StockFetcher Forums · Filter Exchange · how to create 4x2 type of 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