EMA Proximity Filter Returning Inconsistent Results

Forums ProRealTime English forum ProBuilder support EMA Proximity Filter Returning Inconsistent Results

  • This topic has 3 replies, 3 voices, and was last updated 2 days ago by avatarJS.
Viewing 4 posts - 1 through 4 (of 4 total)
  • #249019

    EMA Proximity Filter Issue in Stock Screener — Help Needed

    I’m encountering inconsistent results with my EMA proximity filter in a stock screener. The filter should only show stocks within a specified distance (in nATR units) from the 200EMA, but some stocks pass while others don’t—even when they meet the criteria.

    Examples (Scanning NASDAQ):
    $SERV
    ATR: 7.6%
    Distance from EMA: 15%
    nATR distance ≈ 1.97 → Should fail, but appears in scan

    $GRRR
    ATR: 11.6%
    Distance from EMA: 4%
    nATR distance ≈ 0.34 → Should pass, but missing from scan

    Would appreciate your help on this, thank you.

    Current ProScreener Code

    #249021

    The problem may be that you’re trying to calculate a 200-period exponential moving average with the free version of PRT. In the free version the screener has a capacity of 256 bars and in the premium 1024. Therefore the exponential moving average won’t be calculated correctly. You can easily check it:

    Check the values obtained for the EMA and you’ll see that they’re not correct, whereas those for the SMA are.
    Solution: reduce the number of periods…

    1 user thanked author for this post.
    #249048

    Since I compute distance between last close and its EMA with a period smaller than the 256 capacity, I do not understand why there is not enough data for accurate results.

    I could use a higher timeframe with lower MA period or purshase the premium version if capacity is the problem but I would like to understand why it is the problem in the first place.

    Can you clarify this please?

    Thank you

    #249049
    JS

    Hi,


    An EMA is a recursive filter where each value is calculated using previous EMA values…

    To achieve a stabilized and reliable calculation, approximately 3 times the chosen period is needed — in this case, 3 × 200 = 600 (history)candles…

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

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