fxDreema

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

    check distance between positions then close one of them

    Questions & Answers
    2
    4
    203
    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.
    • S
      sami91 last edited by

      For each position that is at a short distance (or a certain distance) from another position, close one of them (for example, the most recent one).
      How can I use blue blocks next to pink blocks?
      Or what is the right way for this scenario?
      https://fxdreema.com/shared/e63HK5Xne

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

        This is on on tick not on trade
        image.png
        I would save the open prices into two variables, then compare these

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

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

          @jstap
          How can I save the opening price of each position and then check the distance?
          When I put them in the loop (for each position) or on the on Trade (for each position that is created), it only stores one opening price for me.
          Is it possible to guide the details of this case?

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

            You can save the price when trade is placed in a variable, or get the value in pink blocks separately, save if needed, test and add a new shared link to see what is happening if not working

            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

            J
            B
            D
            E

            17
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors