StockFetcher Forums · General Discussion · vol expansion filter but needs one tweak...<< >>Post Follow-up
fotchstecker
278 posts
msg #155858
Ignore fotchstecker
modified
2/18/2021 5:21:56 PM

Here's a simple filter for breakouts on yearly high. However, when you run it, you're likely filtering for stocks that have met the condition several times in the recent past.

Can the number of times a stock has met the condition over, say, the last 40 days be counted? Then it would be possible to just rank them by count.

Any help/ideas?

Fetcher[
show stocks where high reached a new 52 week high
close above MA(50)
close above MA(200)
MA(50) above MA(200)
/*market_cap is above 1000*/
volume ROC has been increasing for 4 days
Average Volume(30) > 500000
price above 1

set{SO, shares outstanding * 1}
/*show stocks where SO is above 1*/
And add column SO

chart time is 1 year
]



jimvin
149 posts
msg #155860
Ignore jimvin
2/18/2021 5:51:25 PM

This discussion of conditionals (courtesy of "four") may help your quest:

https://www.stockfetcher.com/forums/Filter-Exchange/How-to-count-when-two-separate-criteria-are-met/136196/-1/136200


xarlor
398 posts
msg #155861
Ignore xarlor
2/18/2021 5:58:34 PM

There aren't as many repeating hits as you may have thought.

Fetcher[
set{x1,count(high reached a new 52 week high,1)}
set{x2,count(close above MA(50),1)}
set{x3,count(close above MA(200),1)}
set{x4,count(MA(50) above MA(200),1)}
/*market_cap is above 1000*/
set{x5,count(volume ROC has been increasing for 4 days,1)}
set{x6,count(Average Volume(30) > 500000,1)}
set{x7,count(price above 1 ,1)}

set{long1,x1 * x2}
set{long2,long1 * x3}
set{long3,long2 * x4}
set{long4,long3 * x5}
set{long5,long4 * x6}
set{long,long5 * x7}
long > 0

set{SO, shares outstanding * 1}
/*show stocks where SO is above 1*/
And add column SO

set{hits,count(long > 0,40)}
add column hits
sort column 6 ascending

chart time is 1 year
]



fotchstecker
278 posts
msg #155862
Ignore fotchstecker
2/18/2021 6:53:51 PM

Thank you jim and xarlor.

Xarlor, true enough, not as many in this filter as I thought. This morning I collated this and another filter's results over the last month and for some symbols there were 4,5,6 appearances. So I can only conclude that the other filter contributed at least half of the repeats.

That said, seeing how to do it helps a ton. Thank you.

graftonian
1,079 posts
msg #155868
Ignore graftonian
2/19/2021 10:54:08 AM

Fotch, does this help?
Fetcher[
set{myflag, count(high reached a new 52 week high, 1)}
draw myflag
set{flagcount, count(myflag equals 1, 40)}
add column flagcount
]




fotchstecker
278 posts
msg #155878
Ignore fotchstecker
2/20/2021 9:56:31 AM

Thanks, Graf -- looks like an even easier way. By the way, I am using the filter you've been working versions on.

StockFetcher Forums · General Discussion · vol expansion filter but needs one tweak...<< >>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 2018 - 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.