Issue with open[X] when X is “large”

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #177675 quote
    ToskTosk
    Participant
    New

    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])
    #177678 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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.

    #177679 quote
    ToskTosk
    Participant
    New

    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

    #177693 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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.

    #177824 quote
    ToskTosk
    Participant
    New

    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

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Issue with open[X] when X is “large”


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Tosk @tosk Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by ToskTosk
5 years ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/15/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...