fotchstecker 304 posts msg #156075 - Ignore fotchstecker modified |
3/9/2021 1:32:01 PM
xarlor helped me with a filter with counts of the symbols appearance on that filter for the past 40 days:
https://www.stockfetcher.com/sfforums/?mid=155878
I'm trying to adapt the same concept to the filter below, but I'm struggling. xarlor or anyone else who can give a hand, please let me know.
Where I'm trying to go with this: This is a rotation filter, so the "top" symbols tend to stick around a while. However, it's valuable to know two count-related things:
1. When a symbol has suddenly entered, say, the top 10 or top 5 and has a comparatively low count of appearances. This often means that a significant change of momentum is occurring.
2. When a symbol has a high absolute count in general, but doesn't appear near the top, it often means a steady longer-term change.
One problem with the filter below is that it needs a selection criteria, not just a column-sort ranking like it currently uses because you need to count some kind of condition, not just sort the data. not sure of how to solve this, since the stocks are just bought as they rotate-in to the top 5.
Maybe the selection criteria is that count > 0 over the last 40 days? That way it includes everything that has appeared (but still needs a count solution).
Any help would be greatly appreciated.
Thank you.
|
SAFeTRADE 646 posts msg #156078 - Ignore SAFeTRADE |
3/9/2021 10:39:15 PM
8/16/2011 3:06:37 PM
Hi, adapt this filter to your needs. This is from one of Kevin's masterpieces. May give you ideas
of how to implement what you are trying to do.
The issue is related to how custom variables and counts handle weekly data. Once you create a custom variable, the variable is established as a "daily" variable.
While not an ideal solution, the example below may do what you are looking for.
|
SAFeTRADE 646 posts msg #156079 - Ignore SAFeTRADE |
3/9/2021 10:54:30 PM
Try this one if you have more than 4 markets. This is another one of Kevin's work at Stockfetcher.
|
Cheese 1,374 posts msg #156092 - Ignore Cheese |
3/10/2021 2:18:50 PM
fotch,
TRO's approach to "quantify" uptrends and downtrends strings of 1 and 0 may be of use to you.
https://www.stockfetcher.com/forums/Filter-Exchange/bollinger-bands/26146/210
https://stockfetcher.com/forums/Filter-Exchange/How-To-Search-for-MA-20-MA-50-MA-100-MA-200-Cross-Over/35908/0
Best wishes with your invention.
|
fotchstecker 304 posts msg #156100 - Ignore fotchstecker |
3/10/2021 9:26:20 PM
Hi, Safetrade and Cheese -- thank you both for your suggestions. I'm going to give a try to both methods tomorrow to see what I come up with. Thanks again!
|
fotchstecker 304 posts msg #156130 - Ignore fotchstecker modified |
3/12/2021 7:13:23 PM
I want to share the solution I came up with for counting hits on a filter where there aren't conditions. It's based on what xarlor shared. And my version very simple so it probably could be enhanced.
This is a rotation filter, so it is important for me to know how long a ticker has been appearing, or if it is newly among the highest-ranked symbols.
The way I solved it is to simply count the ranking/sorting column if it has value greater than 1. You can change the target value to identify tickers that are popping quickly, or to see those that have been around a lot. The base code is commented in the "hit machine" comment line.
I'll leave the filter as I use it. I tend to copy/paste from the commented-out criteria rather than create separate filters.
|
fotchstecker 304 posts msg #156131 - Ignore fotchstecker modified |
3/12/2021 7:19:59 PM
This further explains why this count is needed. See how VDE suddenly appears among the "mainstays". Soon thereafter, a few days, VDE was among the top 3. And it has been hovering there since.
The main problem with my solution is that the "count" rolls-forward with the counting lookback window, in this case 100 days. So, "31" will not necessarily increment to "32" on the next day, since the end of the window moves forward one day and the new window might not contain a hit. Therefore, you might not see the numbers increment until several days later -- at least this is why I think it happens this way.
Still, progress kind of. Thanks to all who shared help along the way.
|
Cheese 1,374 posts msg #156133 - Ignore Cheese modified |
3/13/2021 12:26:54 AM
Wow, lots of work.
Thank you for sharing your labor of love.
I hope your hard work will pay off handsomely
Trade well !
|