fxDreema

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

    Sum of many variables.

    Questions & Answers
    5
    6
    616
    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.
    • J
      Juan Manuel Quiñonero last edited by

      How can I add 20 variables and save it in another variable?
      var1+var2+var3+var4.....var19+var20 = Var_sum.

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

        You will have to use formula block many times to achieve that. But, an easier way would be to use a custom code block and add up the variables.

        1 Reply Last reply Reply Quote 0
        • J
          Juan Manuel Quiñonero last edited by

          Thanks I have used the custom code.

          Alex81 1 Reply Last reply Reply Quote 0
          • Alex81
            Alex81 @Juan Manuel Quiñonero last edited by

            @Juan-Manuel-Quiñonero would you please describe how you did it?
            Thanks

            The only edge on the market is to lose less than you win...

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

              In custom code, variable = V1+V2+V3+V4; etc

              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! 😊

              1 Reply Last reply Reply Quote 0
              • J
                JamieCisneros last edited by

                Hello. You can just replace var1, var2, etc., with your actual variable names, and add them together using the + operator. Hope this helps.

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

                Online Users

                L
                O
                S
                E
                J
                D
                M
                X
                K
                E
                D

                33
                Online

                146.6k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors