Excluded Middle
Forums › ProRealTime English forum › ProScreener support › Excluded Middle
- This topic has 9 replies, 4 voices, and was last updated 7 years ago by ame.
-
-
10/08/2017 at 8:00 PM #48663
Hi
I’m executing this screener against European Indices (daily), but the problem appears with other lists too.
Highs compared over two distinct periods12345left=highest[20](high[240]) // highest high over one month a year agomiddle=highest[220](high[20]) // highest high during period 1 month to 11 months agoz=(middle <= left)//z=(middle >= left)SCREENER[z](z as "yes")So, I get no results, but even if I comment line 3 and uncomment line 4, I still get no results. This doesn’t make sense to me – has anyone got any ideas what I’m missing?
Thanks
10/08/2017 at 8:57 PM #48666I don’t know what you want to do but I know that your code does not do what you write in the comments. I think you have to switch the numbers in the [] brackets for your middle variable.
What are the conditions you want to screen for?
10/09/2017 at 1:31 AM #48683Line 1 scans for the highest price 240 to 260 bars before.
Line 2 scans for the highest price 20 to 240 bars before and it should be <= that in line 1.
Is that correct?
Despair is right, what do you want to do? Maybe a plain text explanation is clearer than code!
10/09/2017 at 9:25 AM #4871110/09/2017 at 10:58 AM #48748Thanks everyone for all your responses – robertogozzi described exactly what I was trying to do and I think Nicolas has identified the issue – I will try the same on weekly bars to see if the proscreener limitation disappears for the same period.
10/09/2017 at 12:21 PM #4876610/09/2017 at 12:43 PM #4877110/09/2017 at 5:42 PM #4879610/10/2017 at 7:20 AM #48851Hi again, unfortunately some confusion remains! So, I thought I’d risk another post.
I think there must be something more to it than just the 254 bar limit – see the code below, a much simpler calculation, which uses only 60 bars of daily data. The idea is to find stocks that have hit new highs today but not yesterday.
New new highs12345//new high that wasn't a new high yesterdayha=highest[60](high[1])hb=highest[60](high[2])z = (high>ha) and (high[1]<hb)SCREENER[z](z as "yes")When I run this against “Shares – US Wall St.”, I get many matches, but some of them I believe are in error e.g. “Hawaiian Electric Industries Inc.” – today’s and yesterday’s highs are much lower than the high over the last 60 days so the high>ha isn’t true.
10/12/2017 at 6:48 PM #49193 -
AuthorPosts