Screener – Moving average – Stochastic

Forums ProRealTime English forum ProScreener support Screener – Moving average – Stochastic

Viewing 9 posts - 1 through 9 (of 9 total)
  • #5464

    A request that was addressed to ProRealTime:

     Hello,

    I would like to create a screener that accomplishes the following.

    Screener Long:
    1. The current closing price is above the 50 day simple moving average.
    2. The 50 day simple moving average is higher than 5 days ago.
    3. The 20 day simple moving average is above the 50 day simple moving average.
    4. The Stochastic [8,3] has to be less than 40. If it then rises by 5 points that’s when I want to get a screener result.

    It could be that the Stochastic goes down to 30 (or any number below 40) and then could take only 1 day to increase by 5 points to 35, but it could also take 2 days or 3 days, or theoretically any number of days if the market goes sideways.
    Also it could happen that the Stochastic goes down to for example 30, increase by 2 points to 32, then goes down for a few more days to 10 and then takes X number of days to increase by 5 points.*

    Suggestion for an anwser:

     

     

     

    #5706

    Hi Henry,

    Thank you for the code.

    Is it possible to add a condition that only gives you a scanner result on the first time when the Stochastic has gone up by 5 points. This could be after one day or two days or theoretically any number of days it takes to go up by at least 5 points.

    Currently the scanner gives a result not only on the first time it has gone up by 5 points but also on the subsequent days, for example when the Stochastic has gone up by 10 points off the low on the second day it also shows up in the results.

    Thanks a lot.

    Kind regards,

    Sascha

    #5711

    Hello geodelsa, a simple solution (maybe?) would be to add a treshold on the c4 condition :

    As far as I understand your request.

     

    #5771

    Hi Nicolas,

    Thank you for your message.

    Unfortunately it’s not a predefined threshold but it’s the time that is the determining factor.

    It could take X number of days for the Stochastic to go up by at least 5 points. I only want to have a scanner result on that day when the Stochastic went up by at least 5 points.

    I attach a screenshot to clarify it.

    On the first day the Stochastic went up from 15.81 to 26.99. This is more than 5 points and it shows up in the scanner results.

    After that day I don’t want it to show up again the search results. However over the following 3 days it keeps showing the same stock (HPE).

    Hopefully this helps.

     

    Thanks.

    Sascha

    #5778

    Hello Sascha,

    I changed a bit the conditions of the screener, it filters a lot and I think it may solve your problem:

    Tell me if it’s ok now! Have a good day 🙂

     

    #5797

    Hi Nicolas,

    Thank you for your update of the code. I ran a few checks and it seems it solves the issue.

    However there is one case that I didn’t consider initially which is the following.

    It can be that the Stochastic drops below 40 let’s say to 38 and then increases by 5 points to 43. This would be acceptable as a result .

    So technically if it drops to 39.99 and then goes up over the following days to 44.99 that would be ok.

    Would you be able to integrate that in the code?

    I think the way it’s currently coded asks for the Stochastic to be below 40 after it has gone up by 5 points.

     

    Thank you so much for your help.

    Kind regards,

    Sascha

     

    #5861

    In any cases, the actual screener will give you results that have the c4 condition to be true (stochastic below 40). So if you only want to test if the previous stochastic was below this level and not necessarily on the actual day, change the line 15 to:

    I did not tested it, but I think it would be ok.

     

    #18079

    Hi Nicolas,

    I added another question yesterday but it seems it has disappeared. I just wanted to make sure it was uploaded properly at first. Therefore, did you delete my question or didn’t it show up for you?

    Thanks.

    Kind regards,

    Sascha

    #18080

    I made another topic from it, since it is not related to this screener specifically: http://www.prorealcode.com/topic/trend-analysis-screener-help-for-code/

Viewing 9 posts - 1 through 9 (of 9 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login