Screener results make little sense

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #258741 quote
    sgrech
    Participant
    Junior

    I am very very puzzled, when the running hte following code on weekly timeframe for UK stock I see unexpected results eg Capricorn Energy (CNE)??

    Very greatful is someone is able to provide some insight.


    // ================================================================================
    // TIMEFRAME: Daily
    //
    // CONDITIONS:
    //  c1: 50MA declining — current 50MA below its value 5 bars ago
    //  c2: 20MA trending higher over last 5 bars — all 5 increments rising
    //  c3: 20MA < 50MA < 80MA — MA stack in order
    //  c4: High above upper Bollinger Band — breakout attempt
    //
    // OUTPUT COLUMNS:
    //  none — simple pass/fail screener
    //
    // INDICATORS USED:
    //  - 20MA, 50MA, 80MA (daily)
    //  - Bollinger Bands upper (20 period, daily)
    //
    // KEY CODING NOTES:
    //  - c1: ma50 < ma50[5] — 50MA lower than 5 bars ago
    //  - c2: checks each of last 5 bars rising — ma20 > ma20[1] etc
    //  - c3: ma20 < ma50 AND ma50 < ma80
    //  - c4: high > BollingerUp[20](close)
    //  - No illegal line breaks — all compound conditions on single lines
    // ================================================================================
    
    TIMEFRAME(weekly)
    
    ma20 = Average[20](close)
    ma50 = Average[50](close)
    ma80 = Average[80](close)
    bbUpd = BollingerUp[20](close)
    
    // c1: 50MA declining — below its value 5 bars ago
    c1 = ma50 < ma50[5]
    
    // c2: 20MA trending higher over last 5 bars
    c2 = ma20 > ma20[1] AND ma20[1] > ma20[2] AND ma20[2] > ma20[3] AND ma20[3] > ma20[4] AND ma20[4] > ma20[5]
    
    // c3: MA stack in order — 20MA < 50MA < 80MA
    c3 = ma20 < ma50 AND ma50 < ma80
    
    // c4: High above upper Bollinger Band — breakout attempt
    c4 = high > bbUpd
    
    // --- SCREENER ---
    TIMEFRAME(default)
    SCREENER[c1 AND c2 AND c3 AND c4]
    
    #258755 quote
    Iván González
    Moderator
    Master

    Hello. I’ve checked the code and it’s correct. I don’t see anything unusual.

    Can you show me the errors you’ve detected?

    #258778 quote
    robertogozzi
    Moderator
    Master

    @sgrech

    Plese select the correct support forum before starting a new topic.

    I moved this one to the SCREENER support forum from Platform Support: Charts, Data & Broker Setup.

    Thanks 🙂


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

Screener results make little sense


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
sgrech @sgrech Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by robertogozzi
1 day, 7 hours ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/05/2026
Status: Active
Attachments: No files
Logo Logo
Loading...