fxDreema

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

    Quick Question

    Questions & Answers
    0
    14
    549
    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.
    • T
      tpt last edited by tpt

      Hi,

      I have an EA that executes trades whenever certain buttons (Buy/Sell, etc.) are being pressed on my MT5 chart.

      I wonder if there's any way to create a button that will move the stop-loss of all the active positions to break-even. Once this is done, I'd like my EA to completely ignore those positions - none of the condition blocks in the EA will be able to affect the break-even positions anymore, none of the buttons will trigger anything on the break-even positions anymore, etc.)

      I'm not very familiar with groups (the EA doesn't initialize any group), but maybe I could find a solution using them. The project is pretty large so I don't think it would be useful to share a link since it would take some time for you to get an idea of what's going on there.

      Thank you very much in advance any help!

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

        @tpt Buttons can do anything, set up a small project just doing the one thing you want.

        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 1
        • T
          tpt last edited by

          @jstap said in Quick Question:

          set up a small project just doing the one thing you wan

          https://fxdreema.com/shared/roqGXazze

          I'd like to have a break-even button. I know how to design it, but I'm not sure how to configure it. Whenever there's an active trade opened by one of those two buttons (Buy/Sell), I'd like to be able to break it even using the break even button. Each time there's one or more active broken-even trades, I'd like them to not be taken into account by the 'No Position' block, or any other conditional blocks in the project.

          I will store the open price and the stop-loss of each trade into two variables to make sure they are break-even. But how can I separate those from the EA and its functions afterwards?

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

            @tpt When is your button drawn? It should draw on init, so it can be used on tick and redrawn. As you have it in a separate tree moving to BE then being redrawn.

            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 1
            • T
              tpt last edited by

              There it is: https://fxdreema.com/shared/oWCW0R1N

              There's no BE button in the project yet. For the moment I'm just interested in the way I can implement my idea.

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

                @tpt Draw button on int, once you click what is on tick will activate, then redraw button or change aspect with code.

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

                T 1 Reply Last reply Reply Quote 1
                • T
                  tpt @jstap last edited by tpt

                  @jstap What blocks should I add in the break-even button tree (on tick) in order to keep all the trades that are break-even separated from my EA functions?

                  Is it possible to add those trades into a separate group? Or to add a comment on each trade and then filter to keep them away from the other conditions in the EA?

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

                    @tpt The priciple is the same, get your buy/sell working, then you can add the BE button, in BE block have minimum settings in so when button pressed be activates and redraws button off, once working buy/sell should be copied to on chart and on tick put beneath a testing block.

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

                    T 1 Reply Last reply Reply Quote 1
                    • T
                      tpt @jstap last edited by

                      @jstap I understand, thank you! How about having one broke-even trade and another trade with a stop-loss in place, both running at the same time. Can I apply the conditions above a 'Positions Count == 1' block only to the second trade (the one with a stop-loss different from the open price)?

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

                        @tpt If trade is placed with a different group, you can use this to control 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! 😊

                        T 1 Reply Last reply Reply Quote 1
                        • T
                          tpt @jstap last edited by

                          @jstap I'm sorry, but I know nothing about groups and couldn't find useful information in the documentation.

                          Would it be possible to add the broke-even trades into a group and let the EA work by having all the other blocks' Group input field blank? If so, how?

                          Would the 'Position stops modified' block be useful on the 'on Trade' tab in achieving this?

                          Thank you for your effort!

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

                            @tpt Blank =0 most blocks have group, when a trade is placed you can add a group number, then add this number to other blocks, and only this group will be controlled.

                            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 1
                            • T
                              tpt last edited by tpt

                              @jstap Yes, but my question is how to change the position's group after the stop-loss moves to break-even? For example, a buy position is opened in group '1'. How do I move it to group '2' when stop-loss becomes equal to the open-price?

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

                                @tpt You can't, if placed as 1, it stays as 1.

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

                                Online Users

                                F
                                C
                                A
                                E

                                11
                                Online

                                146.7k
                                Users

                                22.4k
                                Topics

                                122.6k
                                Posts

                                Powered by NodeBB Forums | Contributors