Proscreener – cross over happened in last “n” number of days
Forums › ProRealTime English forum › ProScreener support › Proscreener – cross over happened in last “n” number of days
- This topic has 6 replies, 4 voices, and was last updated 6 years ago by Vonasi.
-
-
04/12/2018 at 4:53 AM #68073
can some one help me with the screening code.
How do i alter my code if a cross over heppened in last “n” number of days
It is easy to get crossover happened before “n” number of days through the build in option.
i would like to scan the below scenarios:
- MACD Cross over happened in last 5 days
- EMA 125 > EMA 63 in last 5 days
- EMA 10 crosser over EMA20 heppened in last 5 days.
your help is appreciated.
04/19/2018 at 12:47 PM #68789Hi
you may use your variable if supposed to be MACD as per below for 5 days ago:
MACD[5]
04/19/2018 at 2:04 PM #68811If you don’t need all of them to have occurred at the same time you may write:
1234c1 = summation[5](macd[12,26,9] crosses over 0)c2 = summation[5](average[125,1] crosses over average[63,1]) //shouldn't it be the other way round?!c3 = summation[5](average[10,1] crosses over average[20,1])IF c1 AND c2 AND c3 THEN...If, instead, you need all of them to have occurred at the same time you should write:
1234c1 = macd[12,26,9] crosses over 0c2 = average[125,1] crosses over average[63,1] //shouldn't it be the other way round?!c3 = average[10,1] crosses over average[20,1]IF summation[5](c1 AND c2 AND c3) THEN...04/19/2018 at 2:07 PM #68812Hi
you may use your variable if supposed to be MACD as per below for 5 days ago:
MACD[5]
This will only check whether it happened the 5th last bar, not within the last 5 bars.
1 user thanked author for this post.
05/14/2018 at 2:37 AM #70320Hi Robert,
thank you very much. this is exactly what i am looking for.
12345c1 = macd[12,26,9] crosses over 0c2 = average[63,1] crosses over average[125,1]c3 = average[10,1] crosses over average[20,1]IF summation[5](c1 AND c2 AND c3) THEN...can i use something like below:
1234IF summation[5](c1 AND c2 AND c3)THEN C4screener ...c405/14/2018 at 8:59 AM #70331You certainly can!
There is no limit to what you can do provided the syntax is correct (but this is easy, since PRT takes care of it) and, most of all, the logic is correct (which PRT cannot check).
Yes, your example is correct.
1 user thanked author for this post.
05/30/2018 at 12:11 PM #71688 -
AuthorPosts
Find exclusive trading pro-tools on