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
if close > open[10] then
c1 = 1
else
c1 = 0
endif
screener[(c1)](open[10])
If 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.
Thanks for the reply. How do I know what version of ProScreener I have? I use ProScreener within ProRealTime v11.1.
And as I wrote, the issue appears within 24 hours/bars, so regardless of version, the issue remains.
Jonas
To test if you have the new version use this example:
SCREENER[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.
Thanks.
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