Screener unknown error

Forums ProRealTime English forum ProScreener support Screener unknown error

Viewing 5 posts - 1 through 5 (of 5 total)
  • #15237

    Hi guys,

    Ive written this code and I can’t see anything wrong with it but the screener output doesn’t like it since it just returns my whole list.

    Can anyone see what is the problem with my code? also if I remove the first timeframe it works, but i’ve used code with dual timeframes before and it worked fine.

    thanks

     

     

    #15258

    Well, there are a lot of “or” statements conditions, it is difficult to know why you have this problem. Obviously, because of the OR conditions, seems normal to me that you get a lot of results here. It is also difficult to know what condition has fired the screener result to debug it 🙂

    1 user thanked author for this post.
    #15260

    Ive just found the problem; the first timeframe was using the same ‘ma20’ ‘ma50′ ma100′ ma200’ as the second timeframe. Thanks for replying

    #15264

    Hi, don’t know about same moving averages used in both timeframes if you wanted different ones, this depends on your choices, but from a coding point of view, if we take a look just at first timeframe only, we can see you first define ma20 in line 2:

    and then you use this same ma20 name for storing a condition (0 or 1) value in line 8

    so later when you reach your lines 12 and 13, the ma20 used in (ma20 crosses under…) is no more the exponential moving average, but just the 0 or 1 value stored in line 8

    same thing with ma50 defined twice in line 3 and line 12, then becoming just 0 or 1 instead of an exp moving average in lines 14-15

    You probably want to rename your conditions ma10 to ma80 in lines 7 to 18 with something different from “ma…” to avoid any confusion between a condition and a moving average

    Problem doesn’t seem to repeat itself in second timeframe because there you used ma1 to ma8, so no double roles with 2 different definitions for ma20 and ma50 there. However, might be worth renaming ma1 to ma8 in lines 27 to 38 with same type of name you choose to rewrite ma10 to ma80 in lines 7 to 18 not to mix up conditions and moving averages

    #15276

    @Noobywan

    I want you as a second brain 🙂

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

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