Screener ignores condition

Forums ProRealTime English forum ProScreener support Screener ignores condition

Viewing 15 posts - 1 through 15 (of 15 total)
  • #140142

    Hi Pro Real code community,

     

    I have created the next simple screener:

     

    The problem is that, with condition c3 in the code, the screener completely ignores condition c1. I know this because in the following code condition c1 is executed properly:

    Any idea on how to make both c1 and c3 work at the same time?

     

    Thank you for your attention.

    Roberto.

    #140147

    I cannot test it, but the cause could be that [INTRADAYBARINDEX -n] may return a negative value and INTRADAYBARINDEX by itself could exceed the 254-bar limit of ProScreener, since 24 hours * 12 5-minute bars = 288 bars.

    I also wonder why you are using DOPEN, since OPEN is available on a Daily TF.

     

    #140153

    To give you some context Roberto, what I try to do is to find those stocks (not forex, so they have 77 5-minute candle per day) whose 5-minute high is above ExponentialAverage[20](close) in 5min TF, whose open price for the day is above ExponentialAverage[20](close) in 30min TF, and whose first 5-minute candle has a low above the second 5-minute candle (plus a condition about the third candle but let’s make it simpler).

    If you test the code with a short list of stocks of your choice, you can see results but with the whole US market group it throws an error inferring that some stocks have 0 intraday candles. I do not know why, but anyway.

    How would you code this?

     

    #140187

    There you go:

     

    1 user thanked author for this post.
    #140198

    Thank you Roberto for your help but I believe that your code does not work either. It finds me stocks (using the whole US market) like the following whose Daily Open is below the EMA20 30min.

    Only if I remove all conditions related to the 5min TF (c2 and c3 in this case), then c1 works. Do you obtain similar results Roberto?

     

     

     

    #140206

    Your pics doesn’t show all data for the 3 TF’s with the values of each MA involved.

    As you can see from my pic, it works (it’s on CFD’s, but this won’t change with FUTURES or whatever, since rules don’t change).

     

    #140238

    I understand. Here it goes the pictures in the right way then.

    You can see that Daily Open is below EMA20 30min for WYNN 27-07-2020 when it should be above according to your code.

    #140247

    C1 is true, since the Daily OPEN (72.630) is above Ema20 on the 30-minute TF (71.064).

     

     

    1 user thanked author for this post.
    #140250

    Excuse if it seems like a stupid question but where do you see that EMA20 30-min TF is 71.064? Because in the 30min TF chart I uploaded its value appears as 73.208.

    #140252

    I completely understand now Roberto. I did not explain myself properly in the definition of the code. I learn a great lesson here. Just for the record: my intention was that the Daily Open was above the EMA20 30min TF at the Opening not at the current level. I have modified the code accordingly and works perfectly now. Thank you for help!

     

    As an aside I have a question related to the code:

    Does the command “intradaybarindex” always ignore the command TIMEFRAME(x minutes) and takes the TF in which it counts the candles from the set Default TF?

     

    I infer this because, for example, to get the EMA20 30min TF at the Opening, I have to define it from the 5-minute rather than directly using the 30min TF using “intradaybarindex” if I still want my 5min TF conditions including the command “intradaybarindex” to work. Code:

    In here c1 works vs. This other similar code in which c1 does not:

    Both with Default TF set as 5min.

    #140274

    BarIndex and IntraDayBarIndex always return the bar number of the TF where they are used.

     

    #140337

    For what I see the intradaybarindex always takes the TF from the Default TF regardless of the TIMEFRAME(x minutes) I used above the command. I do not know whether I’m missing something but have a look at these pictures and maybe you can point out what is is.

    I show the same ProScreener with the Default TF of 5min, 15min, and 30min. You can see the criteria #Bars changing along the Default TF and not corresponding to the value of “x” which is defined within the section TIMEFRAME(30 minutes).

    #140349

    You are right. That’s weird!

    #140354

    Do you think is worth contacting PRT support about it Roberto?

    If it is not a bug in my personal platform, I believe this malfunction limits greatly the flexibility with which we can code.

    #140359

    I think you should.

    Please post their answer when available.

Viewing 15 posts - 1 through 15 (of 15 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login