fxDreema

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

    to modify variabel from condition block?

    Questions & Answers
    2
    10
    3386
    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.
    • D
      Dieter last edited by

      I want to change the variable "bMaPeriodFast" of the Block166. She should get a result from the Formula314. I don't know how to implement it. I need help. I can select in block "modify variables" the variable from Block166 and assign the result from Block314. That does not help.

      What can I do to change the variable "bMaPeridFast" in Block166 - see attachemnts?

      ......
      Modffication Variables bMaPeriodFast.jpg
      test_MA-buffers1.xml

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

        Block IDs matter when you have blocks connected in parallel - the ones with lower ID are executed first, so in this project the first block to be executed after 310 is 166, then 313, 314 and 314. I can recommend to connect calculation blocks one after another, not in parallel.

        1 Reply Last reply Reply Quote 0
        • D
          Dieter last edited by

          I will try it. 🙂

          Which one is the correction field?

          regards,
          Dieter

          1 Reply Last reply Reply Quote 0
          • D
            Dieter last edited by

            I have set the block ID´s from 1 to 5. i hope, this is ok.?
            Now, the ea can not compiled.
            What is the problem - see attachements?

            regards,
            Dieter

            ......
            test_MA-buffers2.xml
            Modify Variables 2.jpg

            1 Reply Last reply Reply Quote 0
            • D
              Dieter last edited by

              I have solved some problem.
              I do not want to replace the variable "bMaPeridFast" of the block 5. I want the value of the variable "bMaPeridFast" change. What should I do?

              ......
              Modify Variables 3.jpg
              test_MA-buffers2.xml

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

                In MQL5 global variables used as input variables cannot be modified. This is allowed in MQL4, but not in MQL5.

                1 Reply Last reply Reply Quote 0
                • D
                  Dieter last edited by

                  An Ea with ofer 100 variables from MQL4 to MQL5 switch is not time- wise.
                  Is there a way in this fxdreema to copy global- and project variables?

                  I can select to block "Modify Variables" project variable and assign resultes of the Formula, or not?

                  Does fxdreema ( MQL5 ) has another possibility , to change the variables/values of the variables of a condition block (corrections fields are used to add mathematical formula to the opperant)? Which one is the correction field?

                  I want to multiply the value of the block with a value of another block, and install additional operands in the calculation. An example of this will be helpful.

                  If there is no way in fxdreema ( MQL5 ) to change the project variables and values ​​how it should look in MQL4 ?

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

                    I'm not sure if I understand all questions, but in general, in fxDreema - Constants, Variables and Results (Formula block) are all global variables in MQL4/MQL5. Constants are always input (extern, input), while Variables are not by default, but can be (there is a checkbox). Formula results are not input.

                    In MQL5 you can't modify global input variables (with "input" keyword used). In MQL4 you can, but I can recommend to use Variables as variables, and Constants as variables that will not be changed in the project (that's why I named them like this), no matter if this is possible in MQL4.

                    Constants, Variables and Results can be used in all blocks if you write their names somewhere. Or in case of Constants and Variables - by right-click and choose some - in this case the block gets the Constant/Variable by hidden id number, so you can then edit any Constant/Variable name without affecting the project.

                    You can do much more if you know how to program... a little, because you can always create a custom block and write things there. In fxDreema, to modify one variable you use a whole block, while in a custom code you can put as much code as you want (1 line, 10 lines, 100 lines...).

                    1 Reply Last reply Reply Quote 0
                    • D
                      Dieter last edited by

                      I believe that I will start with the programming of mgl5.
                      My question to you is, witch filed can I use as the correction field - see attachement?

                      regards,
                      Dieter

                      ......
                      Correction field.jpg

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

                        Adjust field. You can write there something like "+0.1"... what you put there will be added to the value of that operand, and you can actually see the result if you see the source code of that block (right-click and hit "Source code").
                        Status field - this will change what you see when you run the EA on the top-center. This place where normally it says "Starting..." and "Working".
                        Comparison field cannot be used to write something there, this is a normal html select (drop-down) field.

                        It's always better if someone understands MQL4 or MQL5 here on this website. Or basics of programming, no matter what language - I mean functions, definitions, variables, constants, statements, arrays... If you have questions about this, ask them.

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

                        Online Users

                        M
                        W
                        E
                        G
                        K
                        E
                        A
                        S
                        O
                        S
                        A
                        N
                        J

                        21
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors