fxDreema

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

    Help with code snippet?

    Questions & Answers
    3
    7
    267
    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.
    • J
      jacque82 last edited by

      Dear all,

      Thanks for your time looking at this. I want to achieve the following, hope someone can help me with it.

      Scenario:
      I have an account that is running multiple EAs on it.

      Now, what I want to achieve: when a certain profit is hit on the account, any one of the EA can trigger to close all positions currently on the account (yes the other EAs coded by me). I am using different Magic Numbers for the other EAs.

      I have tried using this method but, it doesn't close the positions by the other EAs.

      3830b5af-dcda-42af-9d4d-0762246467ce-image.png

      I guess, this is achievable with a code snippet instead?

      Any leads/advice is much appreciated.

      Thanks for your time again!

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

        This should close all running trades, is it not closing or instantly re-opening?

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

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

          @jstap It only closes the trades that the EA opened and the manual ones. But it's not closing the other trades that other EAs opened.

          Thanks again!

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

            Everything you have put there should cause all trades to close

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

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

              @jstap Thanks again... I'll double check my codes again...

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

                If you add a shared link I will have a look

                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
                • S
                  sktsec @jacque82 last edited by

                  @jacque82
                  Your setting only close trades of the same chart symbol.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  Online Users

                  S
                  T
                  A
                  Y
                  H
                  B
                  K

                  32
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors