Possible bug using summation in screener

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #57657 quote
    David R
    Participant
    New

    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

    #57659 quote
    Nobody
    Participant
    Veteran

    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

    David R thanked this post
    #57660 quote
    David R
    Participant
    New

    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.

     

    🙂

    #57687 quote
    Nicolas
    Keymaster
    Master

    ProScreener has a limitations of 256 bars lookback. In your second code example you are looking at a 257th one which doesn’t exist.

    David R thanked this post
    #57696 quote
    David R
    Participant
    New

    Thanks Nicolas, that makes sense 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Possible bug using summation in screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
David R @tiggz0r Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by David R
8 years, 2 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/08/2018
Status: Active
Attachments: No files
Logo Logo
Loading...