fxDreema

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

    Closing problem with hedging positions

    Questions & Answers
    2
    4
    176
    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.
    • M
      mistrzmaju last edited by

      Hi, I have been using fxdreem for a while now. I'm doing an EA based on YT to learn how to use it.

      I came across an EA that involves hedging each position along with the grid.
      I wanted to change the logic of closing positions. I would like that when Profit (account) = x $, I would like to close all positions.

      Situation as below, with $10 profit, positions were about to close
      c590a375-0727-4231-8e9d-4271098859cc-image.png

      Anyone know which piece of code I should pay attention to?
      dd90387e-7d35-405d-b87a-c5c9ee0c79a4-image.png

      Link to EA -> https://fxdreema.com/shared/PEKNQJA8

      Thx for help !

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

        You do not need an if position block because there must be running trades to have a value, try using >= instead of == in case logic misses the exact microseconds prices match

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

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

          @jstap it's work ! thank you 🙂

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

            .......😉

            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

            E
            E
            J

            8
            Online

            147.0k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors