Screener results showing incorrect output

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #240413 quote
    trwcapital
    Participant
    New

    I realize the below code is calling a number of custom indicators but can anyone tell me why when I loaded it today, it started showing stocks that did not meet all 5 criteria I have specified. I created an indicator on a chart that mirrored my weeklyc1 and weeklyc2 criteria just to confirm and on the chart the indicator show it’s not a complete match.

     

     

    lrs10, lrs20, ignored = CALL “LRSATR_T”[20,10]
    gapatrx = CALL “GapATRx”

    atrxd2sma,ignored = Call “ATR_D2_SMA_T”[20,10]
    atrx = Call “ATRx”

    Timeframe(Weekly)

    weeklyc1 = (high[1]=highest[7](high) OR high=highest[7](high))
    weeklyc2 = (lrs10>0 AND lrs20>0 AND lrs10 > lrs20)

    Timeframe(Daily)

    dailyc1 =(high[1]=highest[14](high) OR high=highest[14](high))
    dailyc2 = (lrs10>0 AND lrs20>0 AND lrs10>lrs20 AND volume[1] >2000000 AND volume[1]>average[20](volume) AND average[10](close)>average[20](close) AND gapatrx<6 AND atrxd2sma < 10 AND atrx[1]<50)
    dailyc3 = ((close[1]-close[2])/close[2]>.1 OR (close-close[1])/close[1]>.1)

    // Combine setups into final screener condition
    SCREENER[dailyc1 AND dailyc2 AND dailyc3 AND weeklyc1 AND weeklyc2]

    #240414 quote
    trwcapital
    Participant
    New

    I got it!

     

    I had to call the set of indicators (lrs10 and lrs20) under the weekly timeframe as different variables in order for those to be based on that timeframe in that section of the code.

     

    // Load necessary indicators// Load necessary indicators
    lrs10, lrs20, ignored = CALL “LRSATR_T”[20,10]
    gapatrx = CALL “GapATRx”

    atrxd2sma,ignored = Call “ATR_D2_SMA_T”[20,10]
    atrx = Call “ATRx”

    Timeframe(Weekly)

    wlrs10, wlrs20, ignored = CALL “LRSATR_T”[20,10]

    weeklyc1 = (high[1]=highest[7](high) OR high=highest[7](high))
    weeklyc2 = (wlrs10>0 AND wlrs20>0 AND wlrs10 > wlrs20)

    Timeframe(Daily)

    dailyc1 =(high[1]=highest[14](high) OR high=highest[14](high))
    dailyc2 = (lrs10>0 AND lrs20>0 AND lrs10>lrs20 AND volume[1] >2000000 AND volume[1]>average[20](volume) AND average[10](close)>average[20](close) AND gapatrx<6 AND atrxd2sma < 10 AND atrx[1]<50)
    dailyc3 = ((close[1]-close[2])/close[2]>.1 OR (close-close[1])/close[1]>.1)

    // Combine setups into final screener condition
    SCREENER[dailyc1 AND dailyc2 AND dailyc3 AND weeklyc1 AND weeklyc2]

    Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Screener results showing incorrect output


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
trwcapital @trwcapital Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by trwcapital
1 year, 3 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/16/2024
Status: Active
Attachments: No files
Logo Logo
Loading...