fxDreema

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

    I need help with my EA, after the first take profit

    Bug Reports
    4
    20
    1228
    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.
    • A
      acastilla last edited by acastilla

      Hello. I hope somebody can help me again. I really appreciate the help you always get here.

      Ok, i am trying to create some sort of grid EA, but not with pending orders (because it can be read).

      So right now, just for testing, i have code only three trades. The first one it is placed when we have a moving average crossover, and then it has 60 pips take profit, and with "check profit unrealized" i have -30 pips just to place an order in the opposite direction. If the market goes to the place of the first trade, it will send another one in the same direction. The logic is working the first time (2023.10.01 to 2023.11.01 is the backtesting so you can see what i see. GMT+3 EUR USD), and after ten o'clock, it does the logic properly, but then, after it closes with the take profit, the logic does not work properly. It started sending trades without take profit or respecting the "grid".

      Can somebody take a look and tell me what is failing?

      Maybe it has the logic in the memory at it has been not reseted?

      https://fxdreema.com/shared/MW2IvpMIc

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

        I don't fully understand the logic. What I can see right now is that connecting buy/sell now block below 'for each position' blocks is very risky. Those are loops that can open many trades at once. Specially when connected to another loop below (check profit unrealized). Same with variables. All those variables can be modified more than once per tick because of that.

        (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.

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

          @l-andorrà Thanks for your answer. How would yo do it then?

          The explanation. First trade has a take profit of 60, and if it reaches "stop loss" 30 (not a real stop loss, but the place for the next trade), then it sends the second trade. For the second trade is the same logic, take profit 60 (if it reaches it closes all the trades), and 30 for "stop loss" that it is not a real stop loss, but it is the place for the next trade in 30. And it goes on if you place more trades. Always 60 take profit, -30 for the next trade of the grid.

          1 Reply Last reply Reply Quote 0
          • A
            acastilla last edited by acastilla

            I was thinking thay maybe the logic is wrong. Which will be the better way to assign a number or a name to an specific trade, then get the price, and check a specific amount of negative pips to place the next trade?

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

              I think you need to decide how to place the second trade, you can use pink blocks Pips Away to place another trade, or place a pending trade?

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

              A 1 Reply Last reply Reply Quote 1
              • A
                acastilla @jstap last edited by

                @jstap said in I need help with my EA, after the first take profit:

                I think you need to decide how to place the second trade, you can use pink blocks Pips Away to place another trade, or place a pending trade?

                I did not know about that block. But how can you assign that block to a specific trade?

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

                  Add a shared link to see where you want to add, and what particular way would you like to place the trade?

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

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

                    @jstap The shared link is in the first post. There i explain a little, and in the third post i explained more detailed. If you need more explanation, please tell me.

                    But: 1st trade: 60 pips TP, -30 pips= 2nd trade in opposite direction at the first. For the 2nd trade the same: 60 pips TP, -30 for trade in opposite direction, and you can go on with more trades with the same logic.

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

                      So if I understand it correctly, every time a new trade is open, it needs to be open only if the previous one was 30 pips in loss. Correct? Then, depending on the global profit of all currently open trades, all of them should be closed. Is that what you need?

                      (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.

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

                        @l-andorrà

                        Not exactly, if one trade hit the take profit, all the trades will be close. That logic is alrealy place, that is the part that it seems to be working. in the shared link you can see it placed at the right.

                        1 Reply Last reply Reply Quote 0
                        • K
                          keanzoe last edited by

                          the logic behind your EA is simple but your blocks are complicated. lol

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            acastilla @keanzoe last edited by

                            @keanzoe Yes. And it is wrong, because after the first take profit is hit, the EA stop working properly and send a lot of crazy trades.

                            Could you please tell me a better way to do it?

                            1 Reply Last reply Reply Quote 0
                            • A
                              acastilla last edited by

                              I did in other way, but the same error. The EA stop working properly after the first take profit is hit.

                              https://fxdreema.com/shared/S3Ojt3yCd

                              1 Reply Last reply Reply Quote 0
                              • A
                                acastilla last edited by

                                Ok, the problem is in the right module: For each closed position. I am trying to find a solution, but right now i couldn't do it.

                                1 Reply Last reply Reply Quote 0
                                • A
                                  acastilla last edited by

                                  It seems the logic keeps looking in "For each closed position", so that is the reason that after the first take profit the EA does not work anymore, because the EA looks again there and then it closes all the trades. Anyone knows how to solve this?

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    keanzoe last edited by

                                    Why did you put (close trade) block? The trades are closed by tp and sl. Remove that and it should start producing entry again

                                    A 1 Reply Last reply Reply Quote 0
                                    • A
                                      acastilla @keanzoe last edited by

                                      @keanzoe Because i want to close all trades of the grid after a take profit has been hit. That is the problem. The EA keeps looking in "for each closed position", and close all trades. I am going to try with "pips away from open price" to see if that works better.

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

                                        purple trade closed block on the on trade tab will allow blocks to work only once as something 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! 😊

                                        A 1 Reply Last reply Reply Quote 1
                                        • A
                                          acastilla @jstap last edited by

                                          @jstap said in I need help with my EA, after the first take profit:

                                          trade tab

                                          Ohh! This seems to be the solution. Testing!

                                          And thanks!

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

                                            @acastilla You are welcome

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

                                            Online Users

                                            M
                                            F
                                            E
                                            T
                                            M
                                            P
                                            S
                                            A

                                            17
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors