fxDreema

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

    True or False in external parameters, how do I?

    Questions & Answers
    2
    10
    3494
    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.
    • tcanuto
      tcanuto last edited by

      FxDreema Hello! I wonder how can I have an option true or false so I can enable or disable some features of my EAs?

      Until more!

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

        Interesting, we have the same here: fxdreema.com/forum/viewtopic.php?f=2&t=1947
        Well, the reason why I didn't added it to not make thing look too complex for newbies, and because numeric values of 0 and 1 can be used instead of boolean... most of the time. But because this is the third question for this feature I guess I must add it.

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

          Hm... I think I was confused the first time I read this question. What do you mean exactly?

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

            Hello fxDreema.

            What I mean is an external variable to enable and disable some external parameters, which in fact is nothing more than blocks. For example ... If I want to enable dynamic SL, put true in SL dynamic external parameter, but if I no longer want to use, put false to disable it. That for any external parameter of the EA.

            How do I do that? Could you show me an example project?

            Until more!

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

              Welllll... my point of view is that fxDreema should not create single universal EA that is supposed to do everything. That was the reason why I started it - because I wanted to NOT try to create universal EA.

              You can define external parameter and add it to Condition for example, this way you can change the path after that Condition depending on what is the value of that parameter.
              I just added "Value (boolean)" to Condition, you can try this for example.

              But to change, for example "Stop-loss mode"... it's not impossible in theory, but I don't think it is a good idea. Actually I think I will disable external parameters for all drop-down menus in blocks. This is because they are represented as a string values, but they are nowhere documented.

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

                Ok .. but in this case has the LeftOperand and RightOperand. Try but do not know if will work. I will test this way:

                LeftOperand - Value Boolean - true == RightOperand - Value Boolean - true (imput parameter). In this case if it is true.
                LeftOperand - Value Boolean - true == RightOperand - Value Boolean - false (imput parameter). In this case if it is false.

                Was this the correct way?

                There would have only a block?

                Until more!

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

                  Now it seems that there is no input field in "Value (boolean)" that we can assign to a Constant, because there is only one drop-down True/False menu. I winder if I have to make it possible to assign Constants and Variables to those drop-down menus... but nevermind.

                  http://fxdreema.com/shared/NiBgwlwC
                  Boolean datatype is not very different than a numeric 0 and 1, where 0 is false and 1 is true. We can use Value (numeric) when we work with boolean values and there are even no warning messages in MQL4. It just works.

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

                    Hi I have done this way. This right also?
                    http://fxdreema.com/shared/FoXQuwu8

                    Until more!

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

                      Well, this will work as well, only the name of the variable is automatically generated 🙂

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

                        Cool! I see I'm on the right track! Found more practical in this way.
                        Thanks fxDreema.

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

                        Online Users

                        M
                        G
                        D
                        A
                        A
                        R
                        G
                        S

                        29
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors