fxDreema

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

    Variable issue when running EA on multiple pairs

    Questions & Answers
    3
    6
    1112
    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

      I want to run my EA on multiple pairs at the same time.

      I just noticed that my variables are shared between multiple pairs. This is making my EA a mess. How can I have variables in its own space for each pair?

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        are you using global variables?
        use instead of them local variables:
        0_1486575961946_upload-e596461c-b7c3-4d54-ab6f-fbae97404b09
        ...

        Between trading and gambling is a very small gap, be careful.

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

          I don't see any option to define "Global" vs "Local" variables. I am using the variable just like the screenshot you sent.

          How do I ensure I am using Local or Global?

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

            Those variables are global. There are actually members of a class, not real global variables... but they are still global for the fxDreema project. There are no local variables.
            Variables can be arrays by the way, just add [] after the name. But arrays are hard to use in MQL in my opinion, you will most probably see many errors before you finally do what you want with them 🙂

            1 Reply Last reply Reply Quote 0
            • M
              miro1360 last edited by

              sorry 😄 I was talking about these:
              0_1486589636722_upload-40323118-931b-4360-9961-88f6e7c9fa30
              I had in answer meaning "local" as in project, but yes they are "global" too but only for project ... there are another global for whole metatrader ....

              Between trading and gambling is a very small gap, be careful.

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

                In fxDreema these are named "Terminal Variables"

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

                Online Users

                S
                A
                B
                A
                J
                D

                16
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors