philipina 8 posts msg #154543 - Ignore philipina |
11/4/2020 11:48:46 AM
Hello,
I want to detect stocks which have a potential to reverse on a weekly time frame.
The idea is to use a script like the below one.
--------------------------------
weekly MACD below 0
and weekly MACD Fast Line(10,30,10) crossed above weekly MACD Slow Line(10,30,10)
and weekly RSI below 40
and weekly volume 10% above average weekly volume(10)
------------------------------------------
But what I would like get the list of stock which had this pattern during the last 30 days. This will allow me to see which one have started to reverse and look for entry point and which one did not.
Is it possible to apply a filter and get result for the last 30 days?
I hope that my explanation is clear :)
thanks in advance for your help.
Alain
|
nibor100 1,046 posts msg #154546 - Ignore nibor100 |
11/4/2020 12:55:15 PM
You might run into some strange results given that you want 30 days of results for a weekly filter.
If you post your working filter one of us might be able to make it work like the way you described.
Ed S.
|
philipina 8 posts msg #154554 - Ignore philipina |
11/5/2020 2:38:41 AM
Thanks for your response.
Here is the working script I use for now.
--------------------
weekly MACD below -2
and weekly MACD Fast Line(10,30,10) crossed above weekly MACD Slow Line(10,30,10)
and weekly RSI below 60
and volume 20% above average volume(10)
and volume above 300000
-------------------------
thanks in advance
Alain
|
philipina 8 posts msg #154569 - Ignore philipina |
11/7/2020 3:02:29 AM
No one being able to help me on this topic? :(
Thanks in advance for your help
|
snappyfrog 731 posts msg #154570 - Ignore snappyfrog modified |
11/7/2020 9:30:25 AM
I am assuming you want the cross of the MACD lines to be in the last 30 days or 6 weeks if trading days and 4 weeks if calendar days.
|
nibor100 1,046 posts msg #154572 - Ignore nibor100 |
11/7/2020 12:36:30 PM
I believe the goal is to get a long list of stocks in today's filter results that have met the filter criteria on any one of the past 30 days.
I've been working on it a little and my standard cumulative backtest filter methodology is not providing accurate results for some reason, which is aggravating as its worked quite a few times in the past but it might be mixture of weekly and daily criteria causing the issue.
Ed S.
|
nibor100 1,046 posts msg #154575 - Ignore nibor100 |
11/7/2020 1:19:46 PM
Alain,
In the filter segment below that you posted you have a couple of lines that may not be getting you the results you intend:
weekly MACD below -2
and weekly MACD Fast Line(10,30,10) crossed above weekly MACD Slow Line(10,30,10)
and weekly RSI below 60
and volume 20% above average volume(10)
and volume above 300000
1. "and weekly RSI below 60" gives you a weekly RSI(14) result since you did not identify what length RSI you wanted in parentheses.
2. "and volume 20% above average volume(10)" may not be giving you the result you want for a couple of reasons:
a. when the word above is used in a filter SF interprets it as greater than or equal to, according to the SF manual
b. Since you are using a 10 day average of volume that includes the day that the volume is 20% above then the average is already inflated by that day's higher than average volume and SF is going to look for a volume total that is 20% above that higher average volume.
c. When I create a set statement to determine what the value SF uses for
volume 20% above average volume(10)
such as "set{var1, volume 20% above average volume(10)} and add column var1"
For RGNX yesterday which had a volume of 510,700 and avg volume(10) of 359,650, SF shows my var1 as 42 which clearly isn't what I would have expected....
Have you run your filter and checked it results?
and if so is it exactly as you posted?
Thanks,
Ed S.
|
philipina 8 posts msg #154578 - Ignore philipina |
11/9/2020 6:13:42 AM
Hi Guys,
Thank you very much for your comments. I think that you gave me lots of ideas to get this working and validate it.
I will do my home work now and will come back to you once I have it working.
thanks again for your help :)
|