fxDreema

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

    Close trade at X pips profit after it was in Y pips negative DD

    Questions & Answers
    2
    8
    446
    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.
    • B
      BotondKing last edited by

      Hello,

      Can you help me with this? I would like my EA to close a trade when it was in Y pips negative pips, but not at 0 like break even, but at X pips profit.

      Thank you very much in advance!

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

        pips away -Y pips from open set flag true, if true and +pips from open close 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! 😊

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

          Thank you! Like this?

          OnPaste.20240921-131014.png

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

            Add a share link so block internals can be seen. This should be in 2 trees for each tree starting with a for each trade block, 3 blocks for each tree.

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

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

              @jstap https://fxdreema.com/shared/7Rv0ho9tb

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

                This should work fine, is it doing what you need? this needs a trade placed and you want to set the flag back to false, the flag may start false so you may want to reverse, maybe reset flag under the close 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! 😊

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

                  @jstap It doesnt take the DD beforhand into consideration, it just close trade when it is in X pips profit.
                  I am trying to figure it out why

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

                    Is probably the flag state, you want it to only allow the close if DD already considered. You could use a bool variable so you can see the state in a comment.

                    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

                    V
                    O
                    J
                    B

                    10
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors