fxDreema

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

    Would it be a bug??? Sum in Loop for 2 or more orders not working!

    Questions & Answers
    4
    11
    478
    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.
    • OntradingX
      OntradingX last edited by

      Observer in the image and in the project that I am trying to add (the gain of the last 2 orders) for both sides separately, buy and sell.
      The EA is not able to perform this sum, it is taking only the last order.

      ede9ba99-eca6-4073-be8f-ee9caebc8b04-image.png

      Here is the test project! https://fxdreema.com/shared/Uszc3hoHc
      I tested the same on other brokers, would I be making a mistake in logic, or is it a BUG???

      I'm worried if it's a BUG because I imagine that like me, many people use these blocks and conditions to perform different tasks.

      Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
      Site: https://www.ontradingx.com.br
      Youtube: https://www.youtube.com/@ontradingx
      Boa sorte a todos nós!

      English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
      Website: https://www.ontradingx.com.br
      Youtube: https://www.youtube.com/@ontradingx
      Good luck to all of us!

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

        Closed value is for each closed position, use trade closed position for number of which 2 to add, you could also use bucket, just depends on your needs.

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

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

          @jstap I understand what you mean, thank you very much for the tip, but the focus is on knowing if this is a BUG, ​​do you understand this as a BUG or not?

          Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
          Site: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Boa sorte a todos nós!

          English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
          Website: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Good luck to all of us!

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

            Have never seen it not working.

            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
            • S
              sktsec @OntradingX last edited by

              @OntradingX
              Not a bug. I am afraid your EA does not have any logic of summation as you claim. Maybe checking your own logic can help

              OntradingX 1 Reply Last reply Reply Quote 0
              • OntradingX
                OntradingX @sktsec last edited by

                @sktsec my logic is simple as shown in the project. loop to get the last 2 open buys and give me the sum of them. What is the logic error you are seeing?

                Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                Site: https://www.ontradingx.com.br
                Youtube: https://www.youtube.com/@ontradingx
                Boa sorte a todos nós!

                English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                Website: https://www.ontradingx.com.br
                Youtube: https://www.youtube.com/@ontradingx
                Good luck to all of us!

                S 1 Reply Last reply Reply Quote 0
                • S
                  sktsec @OntradingX last edited by

                  @OntradingX
                  How does your logic give you the sum?

                  OntradingX 1 Reply Last reply Reply Quote 0
                  • OntradingX
                    OntradingX @sktsec last edited by

                    @sktsec open the project and understand. i use only 2 blocks to get the sum. 1. In the pink block I am checking only the last 2 orders. 2. In the gray block, I am getting the gain of these 2 orders that the selected block and saving in the variable.

                    Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                    Site: https://www.ontradingx.com.br
                    Youtube: https://www.youtube.com/@ontradingx
                    Boa sorte a todos nós!

                    English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                    Website: https://www.ontradingx.com.br
                    Youtube: https://www.youtube.com/@ontradingx
                    Good luck to all of us!

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

                      @fxDreema help here please.

                      Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                      Site: https://www.ontradingx.com.br
                      Youtube: https://www.youtube.com/@ontradingx
                      Boa sorte a todos nós!

                      English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                      Website: https://www.ontradingx.com.br
                      Youtube: https://www.youtube.com/@ontradingx
                      Good luck to all of us!

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

                        Now that's an example that contains a good amount of blocks and is easily testable, I like it 🙂

                        The problem is that you are not incrementing the variables.

                        Let's get twobuys for example. Block 9 would run block 8 twice for the two last positions, first the last position and then the previous.

                        • On the first run twobuys is set to the profit of the last position, which is -4.06. The value of twobuys was 0 and became -4.06.
                        • On the second run twobuys is set to the profit of the previous position, which is -4.00. The value was -4.06 and became -4.00.

                        If you want to sum both values, you should add the value of twobuys to itself on every run. But also, you must reset the variable every time before such incrementations, otherwise the value will grow and grow without limits.

                        image.png

                        Instead of the side Variables panel, you can also use "Modify Variables" before blocks 9 and 11 to set the variables to 0.

                        OntradingX 1 Reply Last reply Reply Quote 2
                        • OntradingX
                          OntradingX @fxDreema last edited by

                          @fxDreema
                          Glad you liked the way I did to explain my problem.
                          It worked perfectly, you got straight to the point I need.
                          Thanks for your help.

                          I would like another help taking advantage of this post:

                          What if I now want to determine that the EA closes the last 2 buys that it found in profit along with only 1 sale (the last one) that is at a loss?

                          Can you see if my logic is correct?

                          https://fxdreema.com/shared/RTVg6ViKd

                          Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                          Site: https://www.ontradingx.com.br
                          Youtube: https://www.youtube.com/@ontradingx
                          Boa sorte a todos nós!

                          English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                          Website: https://www.ontradingx.com.br
                          Youtube: https://www.youtube.com/@ontradingx
                          Good luck to all of us!

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

                          Online Users

                          W
                          C

                          5
                          Online

                          146.8k
                          Users

                          22.4k
                          Topics

                          122.6k
                          Posts

                          Powered by NodeBB Forums | Contributors