fxDreema

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

    How to put a variable into constant section

    Questions & Answers
    3
    8
    237
    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.
    • N
      nasserminaei last edited by

      I have to create a variable to calculate the initial lot size but I can't see it in the EA input section while using the ea. I think i need to define a constant for it. i don't know how to set a variable value for a constant section

      U 1 Reply Last reply Reply Quote 0
      • jstap
        jstap last edited by

        It is the same, either create a variable or a constant.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        N 1 Reply Last reply Reply Quote 0
        • U
          Uriel 0 @nasserminaei last edited by

          @nasserminaei depending of what do you want, you can create a formula there you use 2 constant to make an arimetic operation, then put the result on a variable. Do not forget to reset the variable (if you need it) when it finalize its function

          1 Reply Last reply Reply Quote 0
          • U
            Uriel 0 last edited by

            Just a such example
            image.png

            N 1 Reply Last reply Reply Quote 0
            • N
              nasserminaei @jstap last edited by

              @jstap
              but I can't see it in the 'input' section while using the EA. I want to be able to change the initial lot using the ea. I can't use the optimization feature as the variable is not listed in 'input' section in MT4

              1 Reply Last reply Reply Quote 0
              • N
                nasserminaei @Uriel 0 last edited by

                @Uriel-0
                but in this example 'VAR_MA_SL_SHORTS' is not listed in the 'input' section in MT4 when you want to run the EA. I want to optimize the initial lot size and I want it to appear in the 'input' section in MT4. thanks

                U 1 Reply Last reply Reply Quote 0
                • U
                  Uriel 0 @nasserminaei last edited by

                  @nasserminaei I just write to you an example of how to asign a value to the variable from constants, just to you can see how to use it...

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    nasserminaei @Uriel 0 last edited by

                    @Uriel-0 thanks, let me try to see if i can fix it

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

                    Online Users

                    T
                    J
                    B
                    A
                    T
                    M
                    E

                    26
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors