Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

First independent community of traders

First independent community of traders Logo First independent community of traders Logo

First independent community of traders Navigation

  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • Buy Theme
  • Home
  • About Us
  • Blog
  • Contact Us

Share your knowledge in the forex community!

Our community is a completely independent place for communication between forex traders and software developers for trading platforms Metatrader 4 and Metatrader 5

Create A New Account
Home/ Questions/Q 3911
Next
In Process
jet4fly
jet4fly

jet4fly

  • 1 Question
  • 1 Answer
  • 0 Best Answers
  • 20 Points
View Profile
  • 0
jet4fly
Asked: December 26, 20202020-12-26T13:59:21+00:00 2020-12-26T13:59:21+00:00In: Forex Expert Advisors

Number of variables in MQL5

  • 0

What is the maximum number of user variables in the expert Advisor settings supported by MQL5?I want to create a multi-currency expert Advisor that works on 52 currency pairs.

Each currency pair has 45 settings and another 65 General settings of the expert Advisor. The total is 52×45 + 65 = 2405 settings.

Won’t MQL5 bend from so many settings?

Or has MQL5 not advanced that much yet and is left with a restrictive rudiment of 1280 user variables?

  • 10 10 Answers
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    10 Answers

    • Voted
    • Oldest
    • Recent
    1. 223231

      223231

      • 0 Questions
      • 13 Answers
      • 0 Best Answers
      • 48 Points
      View Profile
      223231
      2020-12-26T14:00:20+00:00Added an answer on December 26, 2020 at 2:00 pm

      Alexandr Saprykin:
      Do you manually configure all 2500 settings for each pair? I can’t even imagine what you can configure there in such a huge volume. Did you put all the available indicators into one expert Advisor at once?

      Yes, manually. If only filling in the settings separates you from the profit, then you can suffer inconvenience. The indicators are not there, in the form in which you represent.If I need a setting, I just add it, it helps a lot. Naturally, there is no point in optimizing all this, I strive to get away from fitting for Istria, so that you can run on any tool and everything works stably in plus, for this there are so many settings. Yes, and there are many functions and all the necessary ones)

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. savinkins

      savinkins

      • 0 Questions
      • 13 Answers
      • 0 Best Answers
      • 46 Points
      View Profile
      savinkins
      2020-12-26T14:00:13+00:00Added an answer on December 26, 2020 at 2:00 pm

      Thanks, with ini it is clear. This is a regular file in any format, where you can save settings and read them. I thought there were standard mechanisms in which the tester automatically picks up the ini file, hence the question was.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    3. prostotrader

      prostotrader

      • 0 Questions
      • 16 Answers
      • 0 Best Answers
      • 60 Points
      View Profile
      prostotrader
      2020-12-26T14:00:06+00:00Added an answer on December 26, 2020 at 2:00 pm

      Sergey Savinkin:

      How do I write an ini file? Where should it be stored and what is its structure?

      long test_1, test_2, test_3;
      //+------------------------------------------------------------------+
      //| Expert Save settings function                                    |
      //+------------------------------------------------------------------+
      void SaveSettings()
      {
        string file_name = Symbol() + ".dat";
        int file_handle;
        file_handle = FileOpen(file_name, FILE_WRITE|FILE_BIN);
        if(file_handle != INVALID_HANDLE)
        {
          if(FileSeek(file_handle, 0, SEEK_CUR) == true)
          {
            FileWriteLong(file_handle, test_1);
            FileWriteLong(file_handle, test_2);
            FileWriteLong(file_handle, test_3);
          }
          FileClose(file_handle);
        }
      }
      //+------------------------------------------------------------------+
      //| Expert Load setings function                                     |
      //+------------------------------------------------------------------+
      void LoadSettings()
      {
        string file_name = Symbol() + ".dat";
        int file_handle;
        if(FileIsExist(file_name, 0))
        {
          file_handle = FileOpen(file_name, FILE_READ|FILE_BIN);
          if(file_handle != INVALID_HANDLE)
          {
            test_1 = FileReadLong(file_handle);
            test_2 = FileReadLong(file_handle);
            test_3 = FileReadLong( file_handle );
            FileClose(file_handle);
          }
        }

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    4. jet4fly

      jet4fly

      • 1 Question
      • 1 Answer
      • 0 Best Answers
      • 20 Points
      View Profile
      jet4fly
      2020-12-26T14:00:00+00:00Added an answer on December 26, 2020 at 2:00 pm

      Georgiy Merts:

      Can you imagine adding so many settings to the expert Advisor at launch ?  (I’m not saying that when there are so many settings – 45 for a couple – then you are very likely to get a strong “adjustment to the curve”).

      Isn’t it easier to make an ini file in which all these settings are written ?

      Personally, I-in General, all the settings of each pair are prescribed directly in the expert code.

      why .ini? I record and store the EA settings in .set files.

      If the settings are recorded in. ini files, then how to optimize the parameters of the expert Advisor?

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    5. laryx

      laryx

      • 0 Questions
      • 43 Answers
      • 0 Best Answers
      • 112 Points
      View Profile
      laryx
      2020-12-26T13:59:52+00:00Added an answer on December 26, 2020 at 1:59 pm

      Alexandr Saprykin:
      Do you manually configure all 2500 settings for each pair? I can’t even imagine what you can configure there in such a huge volume. Did you put all the available indicators into one expert Advisor at once?

      Yes, I join the question – I have up to six settings for each pair, and I think this is too much. And here-two and a half thousand !!!

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    6. svalex

      svalex

      • 0 Questions
      • 3 Answers
      • 0 Best Answers
      • 26 Points
      View Profile
      svalex
      2020-12-26T13:59:47+00:00Added an answer on December 26, 2020 at 1:59 pm

      Maxim Romanov:
      I have 28 pairs and 2500 settings in the robot, it works fine on real and demo, but there is a limit in the tester, in my opinion 1024 settings. I had to bypass this restriction through a file. That is, you can put these settings there and test them, but you will have to invent them.

      Do you manually configure all 2500 settings for each pair? I can’t even imagine what you can configure there in such a huge volume. Did you put all the available indicators into one expert Advisor at once?

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    7. andreykrivcov

      andreykrivcov

      • 2 Questions
      • 7 Answers
      • 0 Best Answers
      • 30 Points
      View Profile
      andreykrivcov
      2020-12-26T13:59:40+00:00Added an answer on December 26, 2020 at 1:59 pm

      May the gods of the forum forgive me, but guys, this is crazy… Don’t do that(((

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    8. 223231

      223231

      • 0 Questions
      • 13 Answers
      • 0 Best Answers
      • 48 Points
      View Profile
      223231
      2020-12-26T13:59:35+00:00Added an answer on December 26, 2020 at 1:59 pm

      Aidas Geguzis:
      What is the maximum number of user variables in the expert Advisor settings supported by MQL5?

      I want to create a multi-currency expert Advisor that works on 52 currency pairs.

      Each currency pair has 45 settings and another 65 General settings of the expert Advisor. The total is 52×45 + 65 = 2405 settings.

      Won’t MQL5 bend from so many settings?

      Or has MQL5 not advanced that much yet and is left with a restrictive rudiment of 1280 user variables?

      I have 28 pairs and 2500 settings in the robot, it works fine on real and demo, but there is a limit in the tester, in my opinion 1024 settings. I had to bypass this restriction through a file. That is, you can put these settings there and test them, but you will have to invent them.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    9. savinkins

      savinkins

      • 0 Questions
      • 13 Answers
      • 0 Best Answers
      • 46 Points
      View Profile
      savinkins
      2020-12-26T13:59:30+00:00Added an answer on December 26, 2020 at 1:59 pm

      Georgiy Merts:

      Isn’t it easier to make an ini file in which all these settings are written ?

      How do I write an ini file? Where should it be stored and what is its structure?

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    10. laryx

      laryx

      • 0 Questions
      • 43 Answers
      • 0 Best Answers
      • 112 Points
      View Profile
      laryx
      2020-12-26T13:59:25+00:00Added an answer on December 26, 2020 at 1:59 pm

      Aidas Geguzis:
       

      I want to create a multi-currency expert Advisor that works on 52 currency pairs.

      Each currency pair has 45 settings and another 65 General settings of the expert Advisor. The total is 52×45 + 65 = 2405 settings.

      Can you imagine adding so many settings to the expert Advisor at launch ?  (I’m not saying that when there are so many settings – 45 for a couple – then you are very likely to get a strong “adjustment to the curve”).

      Isn’t it easier to make an ini file in which all these settings are written ?

      Personally, I-in General, all the settings of each pair are prescribed directly in the expert code.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Sidebar

    Ask A Question

    Stats

    • Questions 514
    • Answers 2k
    • Posts 5
    • Comments 0
    • Best Answers 0
    • Users 921
    • Popular
    • Answers
    • Tags
      • On: December 18, 2020
      • Answers: 16

      How to allow trading at certain times

      • On: December 29, 2020
      • Answers: 16

      Example of implementing the OOP pattern Abstract Factory using MQL5 ...

      • On: December 18, 2020
      • Answers: 15

      EMA with a different formula

      • On: December 29, 2020
      • Answers: 15

      Invitation for algo traders.

      • On: December 29, 2020
      • Answers: 14

      Dear Programmers, do not pass by, help fix the error!

    • atma1
      atma1 added an answer Added activation. Thanks. April 8, 2021 at 6:54 am
    • iks_
      iks_ added an answer Atma1: Good day, dear colleagues. Yesterday I updated VMware to… April 8, 2021 at 6:54 am
    • renat
      renat added an answer Atma1: Good day, dear colleagues. Yesterday I updated VMware to… April 8, 2021 at 6:54 am
    • mvs
      mvs added an answer Renat Fatkhullin: You can not immediately send the received data,… April 8, 2021 at 6:53 am
    • anton_m
      anton_m added an answer Renat Fatkhullin: How much data do you read? You can… April 8, 2021 at 6:53 am
    analytics british company computer developers django employee employer english facebook french google interview javascript language life php proforexea programmer programs pro vsa salary university

    Related Questions

    • atma1

      Yesterday I updated VMware to version 16.1.0 and the product ...

      • 3 Answers
    • anton_m

      It is not possible to read data from the server ...

      • 6 Answers
    • s22aa

      Tell me what the difference is.

      • 2 Answers
    • areedbreen

      on the chart in the tester one yield and in ...

      • 2 Answers
    • 1006293

      A question about the intersection of moving averages in MQL5

      • 3 Answers

    Users

    atma1

    atma1

    • 1 Question
    • 1 Answer
    s22aa

    s22aa

    • 1 Question
    • 1 Answer
    areedbreen

    areedbreen

    • 1 Question
    • 1 Answer

    Footer

    First independent community of traders

    About

    An independent community of forex traders. This is where traders communicate. You can ask your questions and you will receive an answer to your question.
    • Terms of Use
    • Privacy Policy
    • Cookie Policy
    • Knowledge Base
    • Support

    © 2021 Forexcommunity.net. All Rights Reserved