End of Week data

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #220255 quote
    OllieB
    Participant
    Junior

    Hi all,

    I am running a screener (timeframe = weekly) on a weekend and it seems to be using the data from 2 weeks ago, not the data from the week which has just completed.  I am comparing the low of the week against a 10 period exponential moving average but instead of the using the low from the current week the screener seems to be using the low from the previous week.

    The screenshot attached is for the US stock Mastercard and you can clearly see that for this week, the latest candle, the low is well above the green EMA (10).  This is shown in the data pop-out with the Low = 403.15 and the 10MEA = 396.54.  With this data the stock should not be returned by the screener.

    The screener window also shows the values for the EMA and the Low that it has used, columns EMA and Low, and these are different from the chart window’s data as detailed above.  The screener shows 391.02 and 392.31 respectively.  So for this data set the low is below the EMA but its the data from the previous week!  Its as though the screener is ignoring the current candle.

    The screener code is also attached so you can see what i am trying to do.

    Any help will be much appreciated, thank you!

     

    REM #####################################################################
    REM ### P Criteria
    TIMEFRAME(Weekly)
    
    vMinPrice = 10
    vVol = 500000
    
    cInZone = 0
    cPrice = 0
    vLookBack = 0
    
    cEMA10 = ExponentialAverage[10][vLookBack]
    cEMA20 = ExponentialAverage[20][vLookBack]
    cEMA50 = ExponentialAverage[50][vLookBack]
    cHigh  = High[vLookBack]
    cLow   = Low[vLookBack]
    cClose = Close[vLookBack]
    
    
    REM ### Candle in zone
    cInZone = ((cHigh > cEMA20) AND (cLow < cEMA10))
    cPrice  = (cClose > vMinPrice)
    
    
    REM ### Prev candle up, current candle is down and in zone
    cCandlePat = 1
    
    REM ### Check for small candle
    cATR1  = AverageTrueRange[1][vLookBack]
    cATR14 = AverageTrueRange[14][vLookBack]
    cSmallCandle = (cATR1 < cATR14)
    
    REM ### MAs in order on P
    c11 = (cEMA10 > cEMA20)
    c12 = (cEMA20 > cEMA50)
    rem c13 = (ExponentialAverage[50] < Average[200])
    cMAsInOrderP = (c11 AND c12)
    
    c10TU = summation[uTrendPer](cEMA10 > cEMA10[1]) > (uTrendPer * 0.8)
    c20TU = summation[uTrendPer](cEMA20 > cEMA20[1]) > (uTrendPer * 0.8)
    c50TU = summation[uTrendPer](cEMA50 > cEMA50[1]) > (uTrendPer * 0.8)
    cMA1TrendingUp = (c10TU AND c20TU)
    cMA2TrendingUp = (c20TU AND c50TU)
    cMAsTrending = (cMA1TrendingUp AND cMA2TrendingUp)
    
    
    REM ### Volume MA of 20 days > 500000
    c18 = ExponentialAverage[20](Volume)[vLookBack]
    cVolume = (c18 >= vVol)
    
    cPCriteria = (cInZone AND cPrice AND cCandlePat AND cMAsInOrderP AND cMAsTrending AND cVolume AND cSmallCandle)
    SCREENER [cPCriteria](vLookBack as "LB", CurrentDayOfWeek as "CDoW", cEMA10 as "EMA", cLow as "Low")
    
    #220256 quote
    OllieB
    Participant
    Junior

    Can you see the screenshot?  I’ve tried attaching both a PNG and a JPG but i can’t see that they have come through.

    #220259 quote
    JS
    Participant
    Senior
    Hi OllieB, No screenshot..

    With a time frame of one week, the screener will only use the data from the previous week after the weekend…

    #220273 quote
    OllieB
    Participant
    Junior
    Hi JS, Thanks for the reply. It seems strange behaviour from PRT as the same isn’t true for indicators or the daily timeframe? Any ideas for a workaround? I guess i could get close if i used the daily TF and scaled up the numbers accordingly. Thanks again.
    #220282 quote
    JS
    Participant
    Senior

    Hi OllieB,

    A day changes at midnight, a new week changes on Monday…

    There are more restrictions on screeners, namely depending on the PRT version, they have a data history of 256 bars (complete version) or 1024 (premium version)… (so be careful with using EMAs because they use much history)

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

End of Week data


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
OllieB @ollieb Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by JS
2 years, 6 months ago.

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