Issue with open[X] when X is “large”
Forums › ProRealTime English forum › ProScreener support › Issue with open[X] when X is “large”
- This topic has 4 replies, 2 voices, and was last updated 3 years ago by Tosk.
-
-
09/15/2021 at 6:58 PM #177675
Hi,
The following issue is when running in 1 hour period.
I tried to do a pretty simple screener that tried to compare the current price with the opening price at different times in the past but it came back with some strange results. So I did a screener just to display the opening price and I started playing around with the value between the brackets (in the code below “10”). At certain values the price displayed didn’t match the opening price that I found manually by counting backwards the appropriate number of bars. Finally I realised that for NASDAQ this happened at what corresponded to midnight in the US, so basically, it seems like pro screener can’t give me the right opening price if I ask it to give me the price X hours back, if X is large enough that this means looking at a price from yesterday. At least that’s how it seems to me.
I’ve tried to search to see if anyone else have had issues with this, and found nothing, so I’m thinking that maybe I’m missing something here and this is a feature and not a bug, but it seems like a strange feature so I thought I’d better ask.
Thanks in advance for any help or advice you can give as to what to do.
//Jonas
1234567if close > open[10] thenc1 = 1elsec1 = 0endifscreener[(c1)](open[10])09/15/2021 at 8:03 PM #177678If you have the new version of ProScrener you have 1024 bars to scan backwards.
If you haven’t, then your limit is still 254 bars.
09/15/2021 at 10:06 PM #17767909/16/2021 at 8:49 AM #177693To test if you have the new version use this example:
1SCREENER[close crosses over average[200,1](close)]if it does not return reliable results, then you have the old version (as far as I know IG currently do not support the new version).
You can ddouble check it by changing 1 (within brackets) to 0 (1=exponential, 0=simple MA), because an exponential average uses far more bars than a simple MA, so SMA200 will work on old versions, while EMA200 won’t.09/17/2021 at 6:37 PM #177824Thanks.
Using the code with the “1” seems to work fine when I run it on daily and weekly, but on 1 hour it returns some strange results. The same seem to be true when using “0”.
Nevertheless, I’ve found a workaround for my original problem, so I’m happy with the help I’ve got.
Jonas
1 user thanked author for this post.
-
AuthorPosts