Two Ema superior to an SMA during the last 30 periods
Forums › ProRealTime English forum › ProScreener support › Two Ema superior to an SMA during the last 30 periods
- This topic has 9 replies, 3 voices, and was last updated 6 years ago by Nicolas.
-
-
10/11/2018 at 3:00 PM #82556
I have been trying to set up a Proscreener to find stocks when a 10 and 21 EMA is still > than a 200 SMA after 30 periods have past. Should be simple but the imput screen goes into shock and starts to shake when I try to set the 30 periods.
Anyone who can give me a clue whats going wrong.
Allonso
10/11/2018 at 3:21 PM #82558You can do that by summarize all the boolean “true” value other the last 30 periods, if the result is 30, the screener will return you the shares:
1234condition = exponentialaverage[10]>average[200] and exponentialaverage[21]>average[200]a = summation[30](condition)=30screener[a]10/15/2018 at 12:48 PM #82783Hi Nicholas,
My aplogies for not thanking you earlier for your help, been somewhat overwhelmed with work. It all worked well, the problem is that althougth the conditions were met, the current situation had changed and therefor did not indicate future direction as I had thought.
I have tried another tack the initial condition being that the price close CROSSES OVER the Average(200) 5 Days previously from the current date. However what is happening is that those stocks it finds where the price Crosses above the Average can be anything from 1 to 15. I developed the code using simplified creation. Can you suggest how I can get it to do what I want.
Thank you in advance for any assistance.
Allonso
10/15/2018 at 2:00 PM #82791However what is happening is that those stocks it finds where the price Crosses above the Average can be anything from 1 to 15.
Sorry but ‘from 1 to 15’ what?
Anyway, this is the code you should use about your new query:
12345a = close crosses over average[200]test = summation[5](test)>0screener[test]10/15/2018 at 3:06 PM #82797Hi Nicholas,
Sorry but as I mentioned 5 days from the current date previously I assumed you would understand that I meant that it was showing stocks with crosses from 1 day to 15 days from current date, my apologies and thanks for the code. will test and see what I get.
Is there a limit on the number of times “summation” can be used I any program.
My thanks again Allonso
10/15/2018 at 3:10 PM #8279910/15/2018 at 3:14 PM #8280010/15/2018 at 3:55 PM #8280210/15/2018 at 4:16 PM #82805Hi,
Just tried the correction by Vonasi, It fetches all stocks even those below the AVG 200, and so far I cannot locate any stock that has crossed above the AVG 200 in the last 5 days from the current day. No idea why, hope you can Help.
Thanks Allonso
10/15/2018 at 4:56 PM #82810Despite the fact that the shares has crossed at least one time during the last 5 candles, it doesn’t mean that the price is still above the MA200, you can add a condition to test it too:
12345a = close crosses over average[200]test = summation[5](a)>0 and close>average[200]screener[test] -
AuthorPosts