Proscreener for a specific date
Forums › ProRealTime English forum › ProScreener support › Proscreener for a specific date
- This topic has 5 replies, 2 voices, and was last updated 3 years ago by robertogozzi.
-
-
12/07/2021 at 9:53 AM #18292012/07/2021 at 3:53 PM #182952
There you go (but you can’t go backwards more than 254 bars with IG):
1234567891011MyROC = ROC[10](close)x = 0FOR i = 0 TO 253IF date[i] = 20211203 THEN //Dec. 3rd, 2021IF MyROC[i] > MyROC THENx = ibreakENDIFENDIFNEXTSCREENER [x](x AS "Bar")12/08/2021 at 10:12 AM #182993Thank you robertogozzi (Is it ok to refer like this?)
I guess I was a bit unclear of my need.
Your solution seems to give me all shares that had a greater ROC on a specific date compared to the latest ROC.What I wanted was:
– On specific date, say latest date for a quarter, eg. 20210930
– A list of ROC(60) for the top shares during that quarter: 202107 – 202109Then I want to do the same for the previous quarter, from 20210630 and so on.
I am trying to manually backtest a momentum strategi but perhaps there is smarter ways to do this automatically?
Though I also want to visually see how the graph look like for the top shares.BTW: Can you tell me more about the limitation “you can’t go backwards more than 254 bars with IG”.
Why is that? Is there any more limitations like this with IG?-Erik
12/08/2021 at 11:00 AM #182996254 bars are the maximum lookback number of candles that you can scan.
That is you can refer, at most, say CLOSE[253], or use an Exponential average with no more than about 80-85 periods.
On a 1-minute chart you can access only the last 254 (0-253) minutes, on a Daily chart it’s 254 trading days. If you combine more TFs, the lowest TF sets the lookback period, so a screener cannot use both the Daily and 1-minute TF as a day is made of 1440 1-minute bars, way too many!
If you have access to PRT premium then the limit is now 1024 bars.
To check between a starting and an ending period you need two dates, not just one.
1 user thanked author for this post.
12/08/2021 at 4:00 PM #183023And this is what I have come up with. Any comments robertogozzi?
1234567891011121314151617181920212223242526272829// PRC_ROC-66 stock screener | screener// 2021-12-08// Screens for ROC[66] (configurable) for shares// from a configurable base date//LowestROC = 40 // Need to be adjusted so we get number of hits <= 50period = 66 // Quarter = 3 months = 3 * 22 daysMyROC = ROC[period](close)IGLimitation = 254ROCLimitation = IGLimitation - period // 188// 20210219 Oldest date to define in IG on the 2021-12-08// Defines base date as a date in the last week in March, June, Sep or Dec//baseDate = 20210323 // 2021Q1 Oldest Quarter date to go in IG on the 2021-12-08//baseDate = 20210622 // 2021Q2baseDate = 20210921 // 2021Q3FOR i = 1 TO ROCLimitation // When index = i - 1 is used we can't start at 0IF date[i] = baseDate THENindex = i - 1 // Don't know why this is needed if not used we get ROC at baseDate - 1//index = irocAtBaseDate = MyROC[index]breakENDIFNEXTSCREENER [rocAtBaseDate > LowestROC] (rocAtBaseDate AS "ROC")12/09/2021 at 5:35 PM #183082 -
AuthorPosts
Find exclusive trading pro-tools on