StockFetcher Forums · Filter Exchange · Up Day based on # of down days<< >>Post Follow-up
CaseyDavisMadeMeDoIt
2 posts
msg #154596
Ignore CaseyDavisMadeMeDoIt
11/10/2020 5:56:56 PM

I'm new to StockFetcher but want to get a new filter rolling. I searched the Forums but can't find an exact match.

Here's what I'm looking for:

# days down (user defined)
Based on stock matching the above, what has been historical data that shows a stock will rebound the next day?
Output a % of up day chance
Output a % gain on that specific up day.
Output only results that achieve higher % than user defined

Run the filter and get the following:
For example, Stock "A" has been down 3 (user defined) consecutive days.
- Output - It has happened 12 times in the past "user defined period".
- Output - Out of those 12 times, 75% (8 of 12) of the time it goes up the next day
- Output - Out of those 8 days, it goes up an average of 4.2%
- Output - Only show stocks that rebound more than 3.2% (user defined)

nibor100
1,043 posts
msg #154602
Ignore nibor100
11/11/2020 1:50:46 PM

1. To make it easier on any of us to help you it would be nice if you could post your working filter or the filter your search turned up that was closest to what you envision.

2. I have a few questions regarding your "Run the filter and get the following:" section

a. In this line

- Output - It has happened 12 times in the past "user defined period".

is the '12' user defined or is it just the past "user defined period" that is user defined?

I believe the most days in the past that SF will allow a filter to capture statistics from is 252 at a time, then you have to use a date offset to move it back a year and you can search back another 252 days from then...

b. in the following line:

"- Output - Out of those 12 times, 75% (8 of 12) of the time it goes up the next day"

Did you mean to get 66.6...% or 9 of 12?

c. Do you realize that some of the Output statistics you want will have to be shown/duplicated on every output line when the filter results contain more than 1 stock?

Thanks,
Ed S.





CaseyDavisMadeMeDoIt
2 posts
msg #154604
Ignore CaseyDavisMadeMeDoIt
11/11/2020 5:03:29 PM

Ed,

Thanks for the response.

Answer to number 1 is that I'm new to this and I'm not even educated enough at this point to create a filter.

Regarding a number 2,
a- It has happened "x" times in the past "user defined period". "user defined period" is a block of time, day/week/month
b- Sorry, yes, I meant 66.6%, not 75%. Long day.
c- No I didn't realize that and honestly I'm not sure how to respond to that. I was hoping the data blocks I mentioned as outputs would be displayed above the graph of each result. (ie volume, share price, etc)

Thanks Ed for your help. What can I say, I'm green at this. Is this request is out of the ordinary?

nibor100
1,043 posts
msg #154605
Ignore nibor100
11/11/2020 6:02:09 PM

Your request isn't much different from many others, just some parts of it may be more difficult to do than the average filter so I was just hoping for a starting point since I was unclear about some of items you seemed to want.

As far as how the final display might look for your filter; based on your response you must have the results page set on Chart, as opposed to what I normally have it set on which is Table; so you actually will see numbers above each stock's result chart.

Thanks,
Ed S.

nibor100
1,043 posts
msg #154611
Ignore nibor100
11/12/2020 2:03:59 PM

Try the below filter out and see if it meets your needs and let me know.
For testing purposes I limited the stocks results to those > $2,000 and the historical look back period to 75 days.

Ed S.

Fetcher[
close > 2000

set{cl1, count(close 1 day ago < close 2 days ago,1)}
set{cl2, count(close 2 days ago < close 3 days ago,1)}
set{cl3, count(close 3 days ago < close 4 days ago,1)}

/*multiplying those 2 variables together for true when both are 1 or false when 0*/
set{comb1,cl1*cl2}
set{comb2,comb1*cl3}
/*set{vroc, count(roc(5,1) 1 day ago above 50,1)}

set{vcap, count(market cap 1 day ago above 10,1)}

set{combc,combb*vroc}
set{comb2,combc*vcap}*/

/*setting variable for next day Close-Open Percent Gain*/
set{var2, opcl / open}
set{var3, var2 * 100}

/*Testing the gain variable for 1 day gain or loss*/
set{var4, count( var3 is between 0 and 100, 1)}
set{var6, count( var3 is between -100 and 0, 1)}

/*Only want days filter is true for past year times gain is true or times loss is true*/
set{Tru12, comb2*var4 }

set{var5, count(tru12 > 0 ,75)} /*add column var5 {next day winners }*/
set{Tru13, comb2*var6 }
set{var8, count(tru13 > 0 ,75)} /*and add column var8 {next day losers }*/
set{var20, var5 + var8} add column var20 {times hit in past 75days}
var20 above 0
and sort column 7 descending

set variables to draw gains and loss days when true in past year
set{var7, Tru12*var3 } draw var7
set{var9, Tru13*var3 } draw var9

set{winpre, var5 / var20}
set{win%, 100 * winpre } add column win%

set{avgwin%, sum(var7,75) / var5} add column avgwin%

chart-time is 80 days

/*draw bollinger band(20,2)*/
]



StockFetcher Forums · Filter Exchange · Up Day based on # of down days<< >>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.