Screener – capturing three possible states?

Forums ProRealTime English forum ProScreener support Screener – capturing three possible states?

Viewing 9 posts - 1 through 9 (of 9 total)
  • #122473

    I’m trying to write a screener that can catch three possible states.

    They are:

    • Time signal only
    • Price signal only
    • Price & time signal together

    I want to be able to return one result which identifies which one it is but can only get two states.

    Is it possible, if so how? Could I capture six if need be?

    Thanks again

    Rob

     

    #122489

    There you go, each 1 (true) will have its own position as well as each 9 (false). “99” means ALL conditions are false:

    the third signal is not needed, it is when the returned criterion is “11”, while the other two values can be “91” or “19”.

    1 user thanked author for this post.
    #122499

    Thanks Roberto.

    If I wanted to do the same but incorporate SHORT signals within the same screener (same principle applies, three possible states) is that possible?

    Hope you’re staying out of the way of this damn virus!

    #122509

    You can use 2 and 20 for short signals, leaving 9 and 99 to have these combinations:

    • 99 = 0 = NO signal
    • 19
    • 91
    • 11
    • 29
    • 92
    • 22

    If both opposite signals can occur you might also have:

    • 12
    • 21

     

    1 user thanked author for this post.
    #122510

    I am fine, just staying longer in front of my PC, so I have more time to reply 🙂

    #122515

    Thanks again Roberto

    I think I’m with you. I will work on this in the morning and share the alert code back just in case it’s helpful for anyone else in the future.

    Glad you’re staying out of the way of things. We aren’t quite in lock down here in the UK but the supermarket shelves were very bare earlier when we went out 🙁

    #122573

    Hi Roberto

    I seem to have something wrong in my logic as I cannot get the short signals to activate at all. Can you help pelase?

    Thnaks agian, Rob

    I have converted the code to an indicator to help debug it…

     

    #122579

    Your line 53 ahould read (you coded it as if it were an indicator):

    Moreover when SHORT conditions are true, lines 40 and 46 will reset signal to 99.

    This is the correct code:

     

    1 user thanked author for this post.
    #122584

    Perfect, thanks again Roberto.

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

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