fxDreema

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

    Terminate other EAs

    Questions & Answers
    3
    10
    2665
    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
      BlueMoon last edited by

      Is it possible to terminate other running EA's from within the EA? Here is an example what I am trying to do. I would have multiple EA's doing different things for the pair "EURUSD" When certain condition are met I want all EAs to be closed on all charts of "EURUSD"

      1 Reply Last reply Reply Quote 0
      • C
        catequil last edited by

        Just an idea: you can assign a value (representing an EA individual number) to a terminal variable. This terminal variable is being read by all EA's in 'on tick'. If an EA sees its own number, then it stops.

        1 Reply Last reply Reply Quote 0
        • B
          BlueMoon last edited by

          Thanks for your help. But I am not an expert on this subject and still learning. Do you mind to provide more details with example please?

          1 Reply Last reply Reply Quote 0
          • B
            BlueMoon last edited by

            I am going to bump this since I really need this.

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

              There is a function called ExpertRemove() to remove the current EA, but this function does not have any input arguments, so it works only for the current EA.

              Technically it is possible to work with .dll files and in the past people did some extra stuff that way, but I don't like this method very much.

              What I can suggest is to use those Terminal Variables (https://fxdreema.com/help/working-with/terminal-variables) to communicate between EAs. One EA can check for certain variable to be let's say 1, and then to run it's own "Terminate" block.

              1 Reply Last reply Reply Quote 0
              • B
                BlueMoon last edited by

                I did not find the block "Set Global variable in MT4" in fxDreema.

                How do I modify the terminal variables? How to use them in any blocks? Can you please give an example?

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

                  I guess that I need to update some pictures 🙂 Search for "Terminal variables"

                  1 Reply Last reply Reply Quote -1
                  • B
                    BlueMoon last edited by

                    thank you so much. I was able to find the "Terminal Variable" block. I believe 1 last question is how do I use the terminal variables I declare in the block?

                    I use constant as c::variable name.....I use the regular variables as v::variablename.

                    I tried to use the terminal variable as t:variable name, but this didn't work for me. How do I call it in other blocks?

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

                      No, no, those variables are something entirely different. If you know what cookies are in browsers, those variables are almost the same. MetaTrader keeps them in a file somewhere, so they are stored for few days I think.

                      In MetaTrader click F3 and you will see them. There is a list of Variable (name) - Value pairs.
                      In "Terminal variables" you simply make pairs of such variables. You provide a Name, which is a string (text), for example MyVariable, nothing more. And the value is whatever you choose. The value should be something numeric. Then somewhere in Condition you can read them. Again, you provide the same name - MyVariable
                      0_1523628986382_bf5baee6-e2e0-4dd1-ad61-ff42117701b9-image.png

                      1 Reply Last reply Reply Quote 0
                      • B
                        BlueMoon last edited by BlueMoon

                        Thanks for all your help

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

                        Online Users

                        A
                        E
                        B
                        P
                        S
                        S

                        17
                        Online

                        146.6k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors