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 JS.
-
-
03/31/2023 at 9:58 AM #212598
Hello,
I have this code:
123456789101112131415TimeFrame(Daily)S1=Average[20](Close)C1=Summation[10](S1<S1[1])=10lengthRSI = 14 //RSI periodlengthStoch = 14 //Stochastic periodmyRSI = RSI[lengthRSI](close)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = ((myRSI-MinRSI) / (MaxRSI-MinRSI))*100C2 = StochRSI[1] > 90C3 = StochRSI < 85C4 = Close > 5C5 = Average[7](Volume) > 500000C6 = S1 < 0.94 * S1[10]SCREENER[C1 and C2 and C3 and C4 and C5 and C6](Volume as "Volume")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
03/31/2023 at 10:24 AM #21260103/31/2023 at 7:03 PM #21262703/31/2023 at 7:40 PM #212628C1= summation[5](S1<S1[1])=5 AND summation[11](S1<S1[1])<=10
- says S1<S1[1] happened 5 times most recently,
- 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)
03/31/2023 at 9:28 PM #212632Hi,
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…
04/04/2023 at 9:16 AM #212764Hi,
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.
04/04/2023 at 8:52 PM #212806 -
AuthorPosts
Find exclusive trading pro-tools on