Minimum bars to screen for

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #208515 quote
    Malibu1
    Participant
    New

    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 quote
    JS
    Participant
    Veteran
    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 quote
    Malibu1
    Participant
    New
    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 quote
    JS
    Participant
    Veteran

    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”…

    Timeframe(weekly)
    Condition1 = summation[2](CCI[9] < -100)
    Condition2 = Close[78] > 0
    
    Timeframe(Default)
    SCREENER[Condition1 and Condition2](Condition1 AS "No.")
    
    P0lyTe55 thanked this post
    #208537 quote
    Malibu1
    Participant
    New
    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.
    JS thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Minimum bars to screen for


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Malibu1 @malibu1 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Malibu1
3 years, 1 month ago.

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