Screener results showing incorrect output

Forums ProRealTime English forum ProScreener support Screener results showing incorrect output

Viewing 2 posts - 1 through 2 (of 2 total)
  • #240413

    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

    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]

Viewing 2 posts - 1 through 2 (of 2 total)

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