fxDreema

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

    Pending order Stop Loss changes when it fills

    Questions & Answers
    4
    46
    3534
    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.
    • MTAB
      MTAB last edited by

      Everything else works perfectly, so no clue if this is a bug or I coded it wrong, but when I have two pending orders (a buy pending order for group 1 and a buy pending order for group 2), I set their SL as different variables and they are correct when I look at MT4. Both of the buy pending orders have different fill prices, and different SLs, which are correct in MT4. When the group 1 order fills, it has the right price and right SL, but when the group 2 order fills later (because it is at a different price), the price is right, but the SL for the group 2 order changes to match the SL for the group 1 order. There are no adjustments to the SL for either filled orders for many days after after they fill, so I cannot figure out why the group 2 SL seems to change to the group 1 SL. (Same thing happens with sell pending orders, meaning a second sell pending order will fill but change to match the SL of the first sell pending order).

      I saw a similar post about this (https://fxdreema.com/forum/topic/16217/position-created-block-with-failure/22) but I don't know if it was fixed.

      Any ideas?

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

        Share your project to see what's happening and why.

        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
        • MTAB
          MTAB last edited by

          image.png

          image.png

          image.png
          image.png

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

            Everything is organized by group (1, 2, 3, and 4.) 21H is for group 1 and 52H is for group 2. The only thing I could think of is that the SL variable wasn't updating because it was an "order created" and not a "trade created", but ether one separately or together (as shown) don't fix the issue. I'm stumped.

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

              Share a link rather than pictures, I assume under the switched off blocks nothing happens?

              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
              • MTAB
                MTAB last edited by

                correct, the switched on/off blocks just dictate when a pending order can be created (and only happens once a day) so it shouldn't have any affect on the SL for a pending order that fills. sent you a link to the project and just bought your book! can't wait to read it.

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

                  Are you connecting your buy/sell now blocks to the grey output dot of those pending order blocks for any special reason?

                  (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 0
                  • MTAB
                    MTAB last edited by

                    Hi @l-andorrà ! Yes, because if for some reason the pending order is created too close to the current price or there is an error, it might not be allowed to be created, in which case I want it to open a buy/sell now market order.

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

                      If this helps..

                      image.png

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

                        @MTAB Good for you! 😉

                        (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 0
                        • MTAB
                          MTAB last edited by

                          ok, I even tried to modify the stop loss AFTER the trade was executed, save it to the SL variable and it still has the same stop loss as the original (first) trade! It's driving me nuts!

                          image.png

                          image.png

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

                            @fxDreema Can you please help and see if this is a bug?

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

                              Add your latest shared project

                              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
                              • jstap
                                jstap last edited by

                                Add a shared project not just pictures, and correct your block ID numbers, blocks will activate with the lowest number first, but flow in a line regardless of the next numbers

                                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
                                • MTAB
                                  MTAB last edited by

                                  Below is a link to the latest version trying to correct the SL issue. Am I correct in assuming that the block ID order shouldn't matter in this case, because one is the order created (pending order), and one is a trade created (trade filled)? The issue doesn't seem to be a problem when I run a back test, but I'm fairly sure this was an issue before the custom code was included.

                                  https://fxdreema.com/shared/f1lYnlnoe

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

                                    When you have a large number of blocks it is hard to ascertain the problem, create a test project with a few blocks, and then the problem can be seen

                                    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
                                    • MTAB
                                      MTAB last edited by

                                      That’s good advice, thanks! I will say that for this project, only the launcher and manager areas affect the SL. The change in SL appears to happen the moment the pending order from group 2 fills, if that helps.

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

                                        Ok but there are still about 130 blocks that could interfere, so limit this, and the only blocks that could interfere would be minimal. When I create a EA, I still test 1 section before adding the next. It takes longer but if there's a problem it can only be with the last few blocks I added.

                                        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
                                        • MTAB
                                          MTAB last edited by

                                          That makes sense. This is the most basic aspect of the project. You can probably even ignore the manager blocks, but basically it just creates a pending trade for each group 1-4, stores their variables, deletes them each day if they don't hit, and repeat. Once a pending order does hit, it should be managed accordingly, but the issue is that the SL from group 1 and group 2 are different when they are both pending orders, and even once group 1 fills...and when group 2 fills, it doesn't use the stop loss it had when it was a pending order and instead changes to match the SL from group 1. Would anything in this simplified project make that happen?

                                          https://fxdreema.com/shared/tc6Ide3ze

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

                                            There is still a vast amount of blocks, knuckle this section down to more like 10, and then the problem can be easily identified

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post

                                            Online Users

                                            M
                                            N
                                            B
                                            A
                                            B
                                            S
                                            E
                                            W
                                            M
                                            M

                                            22
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors