fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    HOW CAN I CHECK A VARIABLE OR CONSTANT VALUE??

    Questions & Answers
    2
    6
    1484
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kketzal last edited by

      Hi:

      I,m trying to check a variable/constant value like this:

      IF MyVariable == VALUE THEN
      connect to Block A
      ELSE
      connect to Block B

      I'm trying with predefined "Condition Block", but no luck...

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        In theory it should work. Example or picture?

        1 Reply Last reply Reply Quote 0
        • K
          kketzal last edited by

          Both, please... 😉

          If I'm a variable "onlyEuropeanSession = true" set. I want to do:

          IF onlyEuropeanSession == true THEN
          connect to ONLYEUROPEANSESSION BLOCK
          ELSE
          connect to ALLSESSIONS BLOCK.

          Thanks in advance.

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            My idea was you to give me idea of what you have made, but nevermind 🙂

            https://fxdreema.com/shared/qvqU9jXhb
            I checked this here with boolean constant, which equals to true. In the condition I compare it to boolean true, and it works. Even if I actually added the constant as a numeric value on the left side.

            So, out of this example you should see many horizontal lines. If you change the constant to false there will be vertical lines. If this is what you ask for of course...

            If you don't get this result, check input parameters, because MT does cache of these and sometimes when you change some input parameter (constant or variable) in fxDreema (or MetaEditor) this does not take effect until you manually clear the cache .ini file.

            Or... give me some picture or something that can help me see what is going on on your side 🙂 I checked your web profile and it's empty there, so you probably work on the local version where I can't see.

            1 Reply Last reply Reply Quote 0
            • K
              kketzal last edited by

              Ok. Thanks.

              I think "Numeric" in left operand is key.

              1 Reply Last reply Reply Quote 0
              • fxDreema
                fxDreema last edited by

                Yes, there are many data types, but from all of them only string is unique. All the others are basically integer, which is a whole number. Integer can be used with double (floating number), with boolean (0 or 1). In some situation even string can be used as integer 🙂

                In the case yes, you can compate 0 with false and 1 with true.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                Online Users

                M
                A

                6
                Online

                146.8k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors