Stochastic down trend

Forums ProRealTime English forum ProScreener support Stochastic down trend

  • This topic has 6 replies, 4 voices, and was last updated 1 year ago by avatarJS.
Viewing 7 posts - 1 through 7 (of 7 total)
  • #212598

    Hello,

    I have this code:

     

     

    I would like to see only the assets that have a declining SMA20 between 5 and 10 days instead of the requirement that the SMA20 needs to be negative for at least 10 days.

    Can you adjust the code for me? Thanks

     

    gr Marco

    #212601

    Change C1 with:

    C1=Summation[5](S1<S1[1])=5

    #212627

    Hi Nicolas,

     

    Thanks, but i need it to be  between 5 and 10 days. Now i also get results that are already longer then 10 days in downtrend.

     

    gr Marco

    #212628

    C1= summation[5](S1<S1[1])=5 AND summation[11](S1<S1[1])<=10

    1. says S1<S1[1] happened 5 times most recently,
    2. and didn’t happen at least once:
      • either the 11th time (so… ok 10 days max)
      • or at least once before (so… ok less than 10 consecutive times)
    #212632
    JS

    Hi,

    I think a summation only says something about how often something occurs and nothing about WHERE it occurs…

    Suppose I have 11 elements and 10 meet a certain condition (and 1 does not), then you cannot say with certainty where that 1 element will occur, it can be the last element but also the first… In both cases, the summation is true…

    #212764

    Hi,

    agreed if summation[11](S1<S1[1])<=10 is on its own, then it doesn’t say where is at least one missing occurrence, my bullet point (2.) above says the same thing.

    When I combine it with “summation[5](S1<S1[1])=5 AND …”, then to have C1 true we need both summation subconditions to be true, and for this summation[5] subcondition to be true, it means none is missing in the latest 5 occurrences, so when C1 is true, both subconditions are true, necessarily the missing occurrence is between 6th and 11th. If it was in the latest 5, then the summation[5] subcondition would be false and C1 false with it.

    #212806
    JS

    Hi,

    Actually, it wasn’t a response to your correct code but more of a personal brain wave that I wanted to share… 😉

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

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