fxDreema

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

    How to break or next an object loop?

    Questions & Answers
    3
    9
    798
    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.
    • F
      fxpim last edited by fxpim

      Hi there,

      Right now I am working on an object-based project for the first time. My learning curve, so far, about objects in MQL and fxdreema is pretty decent with all of the information that is available on the forum and elsewhere. However, I have been left with some questions. Since I am using a lot of "for each object" blocks, I frequently hop from one loop to another in the project, and now I am in a situation where two loops mess with each other with their data and the wrong stuff happens, etc.

      Long story short, how do I break or next a for each object loop like you can with a for each position loop?

      Hopefully, you can help me out

      1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        There is no block breaking that loop, I'm afraid. The only option is adjusting the logic of both of them accordingly.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        F 1 Reply Last reply Reply Quote 1
        • F
          fxpim @l'andorrà last edited by

          @l-andorrà I am sorry that I did not answer you earlier but I think I have found the logic in the For Each Object loop. You can nest multiple For Each Object loops into another and the loop is always empty and exited. It exits the loop via the yellow dot when the tasks for each object are done via the red dot. If there are no objects on the chart that meet the filters in the for each block, the loop will always exit via the yellow dot. This allows you to count the number of objects on the chart, check if, for example, a rectangle from another timeframe is inside a rectangle on another timeframe etc. I have added a screenshot of what I have now been able to produce using FXDreema: my version of SMC I have used for manual trading Capture.JPG

          G l'andorrà 2 Replies Last reply Reply Quote 2
          • G
            GeoFX @fxpim last edited by

            @fxpim hey mate, I'm into SMC object-based project as well right now:)
            Do you mind sharing the logic you've mentioned on the breaking Objects in the loop via sharing a project link? Thank you in advance🙌

            F 1 Reply Last reply Reply Quote 0
            • l'andorrà
              l'andorrà @fxpim last edited by

              @fxpim Very interesting. Could you please share some visual hints on the way you fixed it?

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

              F 1 Reply Last reply Reply Quote 0
              • F
                fxpim @l'andorrà last edited by

                @l-andorrà @GeoFX I will try to share it but then I will have to re-create some parts of the project since the project is under contract and pretty big... Capture.JPG

                1 Reply Last reply Reply Quote 0
                • F
                  fxpim @GeoFX last edited by fxpim

                  @GeoFX I think I can explain by now. What you need to do is the following: take a For Each Object loop and store all of the variables you want to check against another object. For me, that would be the upper and lower price coordinates and the beginning of the rectangle. After storing these variables, connect another For Each Object loop to the block that stores the variables and take the condition blocks to check the object of the second loop against the variables you stored in the first loop. The picture shows the block's structure.

                  So basically: first object loop -> store object variables -> connect second loop -> use condition blocks to check the object properties against the variables you have just stored -> object action for the object of your second loop
                  a2341631-1885-4883-b15d-1310dfa82191-image.png

                  F 1 Reply Last reply Reply Quote 2
                  • F
                    fxpim @fxpim last edited by

                    @l-andorrà

                    1 Reply Last reply Reply Quote 0
                    • l'andorrà
                      l'andorrà last edited by

                      Thank you for sharing.

                      (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                      (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                      (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                      Online Users

                      T
                      S
                      A
                      M
                      M
                      E
                      C
                      M
                      F
                      L
                      F
                      F
                      E
                      K

                      28
                      Online

                      146.6k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors