End of Week data
Forums › ProRealTime English forum › ProScreener support › End of Week data
- This topic has 4 replies, 2 voices, and was last updated 1 year ago by JS.
-
-
09/03/2023 at 3:41 PM #220255
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!
Weekend screener12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152REM #####################################################################REM ### P CriteriaTIMEFRAME(Weekly)vMinPrice = 10vVol = 500000cInZone = 0cPrice = 0vLookBack = 0cEMA10 = ExponentialAverage[10][vLookBack]cEMA20 = ExponentialAverage[20][vLookBack]cEMA50 = ExponentialAverage[50][vLookBack]cHigh = High[vLookBack]cLow = Low[vLookBack]cClose = Close[vLookBack]REM ### Candle in zonecInZone = ((cHigh > cEMA20) AND (cLow < cEMA10))cPrice = (cClose > vMinPrice)REM ### Prev candle up, current candle is down and in zonecCandlePat = 1REM ### Check for small candlecATR1 = AverageTrueRange[1][vLookBack]cATR14 = AverageTrueRange[14][vLookBack]cSmallCandle = (cATR1 < cATR14)REM ### MAs in order on Pc11 = (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 > 500000c18 = 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")09/03/2023 at 3:44 PM #22025609/03/2023 at 4:14 PM #22025909/03/2023 at 7:54 PM #220273Hi 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.
09/03/2023 at 9:23 PM #220282Hi 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)
-
AuthorPosts
Find exclusive trading pro-tools on