ameParticipant
New
Hi
I’m executing this screener against European Indices (daily), but the problem appears with other lists too.
left=highest[20](high[240]) // highest high over one month a year ago
middle=highest[220](high[20]) // highest high during period 1 month to 11 months ago
z=(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
I 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?
Line 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!
Proscreener has a limit of 254 bars of data, try to limit your periods lookback at lines 1 and 2 and it should be ok.
ameParticipant
New
Thanks 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.
The 254 bars limit exist on all timeframes.
ameParticipant
New
Yes, I understand, but I’ll be looking over the same date period, so much fewer bars. I’ll post whatever I find. Thank you.
ameParticipant
New
Thanks very much, that worked exactly as I was hoping. Are prorealtime/proscreener limitations like this documented anywhere?
ameParticipant
New
Hi 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 high that wasn't a new high yesterday
ha=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.
ameParticipant
New
It looks like the problem has been fixed behind the scenes – running the code today, there are no erroneous matches at all. Thank you to somebody!