Hi all,
I’m just starting out using PRT so apologies if I’m missing something obvious here. I’ve been building a simple screener and wanted to include a test to see that the 200 day moving average had been going up continuously for a period to establish the share was in an uptrend. I’ve tried a few different timeframes and noticed that I no stocks passed the screening if I tested for 60 days but I get hundred of results at 55 days. I ended up finding that the screener would return no results if I used 56 days.
So, testing on both Australian Stocks and UK stocks, I get hundreds of results with this code
ma200=average[200]
c1 = summation[55](ma200>ma200[1])=55
Screener [c1]
but no results with this code
ma200=average[200]
c1 = summation[56](ma200>ma200[1])=56
Screener [c1]
Am I missing something obvious here?
Thanks,
David
i could be wrong but i think there is a year limit on lookback and 200 plus 55 days is a trading day year from memory so that would explain why 55 is the limit
Thanks, that makes sense and I think you’re correct. I just changed it to a 100 day moving average and that shifted the threshold from 55 days to 155 days.
🙂
ProScreener has a limitations of 256 bars lookback. In your second code example you are looking at a 257th one which doesn’t exist.
Thanks Nicolas, that makes sense 🙂