Minimum bars to screen for

Forums ProRealTime English forum ProScreener support Minimum bars to screen for

Viewing 5 posts - 1 through 5 (of 5 total)
  • #208515

    Hi, I want to add a time aspect to my codes. I find that my screener tends to throw up a lot of shares with minimal bars. I would like to set a minimum amount of weekly bars to 78, which is 1.5 years.

    My code that I am using now :

    Timeframe(weekly)
    Condition1 = summation[2](CCI[9] < -100)
    Timeframe(Default)
    SCREENER[Condition1](Condition1 AS “No.”)

    How do I add to the code so that every stock it screens has 78 weekly bars of history?

     

    #208518
    JS

    Hi @Malibu1

    The amount of historical date of stocks (bars) is independent of a screener…

    Each share has a varying amount of historical data and from this historical data your screener can use up to 254 bars (with IG)…

    In your screener you use a maximum of 9 bars (out of 254) to calculate the CCI[9]…

    If you would like to use more historical data in your screener, you must adjust the conditions of your screener, but that does not seem to me to be the intention…

    Maybe it’s a solution to convert your time frame from “weekly” to “daily”…

    Timeframe(Daily)

    Condition1 = summation[10](CCI[45] < -100)

    Screener[Condition1(Condition1 as “No.”)

    You now use up to 45 bars, instead of 9, of the available 254 bars…

    The results of your screener will probably (slightly?) differ because you now also use the intervening days and not just the weekly closure…

     

    #208524

    Hi JS,

    You are correct in what you say but maybe I didnt explain my issue properly.

    I only want to screen shares that have more than 78 weeks of history(or more than 78 bars of weekly data). So If a share is 5 years old from the incorporation date I want it to be included in the screen. If the share has been incorporated for 6 months then I dont want to have it included in the results.

    So i want to screen a list of shares to ensure it has more than 78 weeks of history, and the results of that I want to apply my cci screen to.

    Does that make more sense?

    #208535
    JS

    Hi Malibu1

    For this you could use an extra condition, for example “Close[78] > 0″…

    With this you check whether the price of 78 weeks ago was greater than zero or simply put “did the share exist 78 weeks ago”…

    1 user thanked author for this post.
    #208537

    JS thats exactly what I wanted. And simplicity at its best. I wasnt sure how you added 2 different conditions but I see exactly how now.

    1 user thanked author for this post.
    avatar JS
Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login