Discussion of article "MQL5 Cookbook: Developing a Multi-Currency Expert Advisor with Unlimited Number of Parameters"

 

New article MQL5 Cookbook: Developing a Multi-Currency Expert Advisor with Unlimited Number of Parameters is published:

The multi-currency Expert Advisor considered in the previous article "MQL5 Cookbook: Multi-Currency Expert Advisor - Simple, Neat and Quick Approach", can be very useful if the number of symbols and trading strategy parameters used is small. However, there is a restriction on the number of input parameters of an Expert Advisor in MQL5: they should be no more than 1024.

And even though this number will very often be sufficient, it is very inconvenient to use such a huge list of parameters. Every time a change or optimization of parameters for a given symbol is required, you have to search parameters for that specific symbol in the long parameter list.

MQL5 Cookbook: Developing a Multi-Currency Expert Advisor with Unlimited Number of Parameters

In this article, we will create a pattern that uses a single set of parameters for optimization of a trading system, while allowing for unlimited number of parameters. The list of symbols will be created in a standard text file (*.txt). Input parameters for each symbol will also be stored in files. This way we will be able to circumvent the restriction of the terminal on the number of input parameters of an Expert Advisor.

Author: Anatoli Kazharski

 

Hello Anatoli,

Thank you for sharing this great EA.

I am testing the EA and there is no 'AUDUSD.ini' file that is being created in the 'common' folder, nor anywhere else. You mention that 'To be able to use current parameters of the Expert Advisor (set in the "Settings" tab), you should select the Input parameters option.' However, I do not see where to make that selection, neither on the "settings" tab nor anywhere else. I would suppose that may be the reason that the '.ini' file is not created? Can you please clarify?

I read in 'FileFunctions.mqh' file under line 87 the 2 scenarios. With 'print' I probably should receive a message in pop-up screen or in journal about this '.ini' file, but that is not the case.

The journal gives a few similar to this line: 'tested with error "critical runtime error 502 in OnInit function (array out of range, module Experts\UnlimitedParametersEA.ex5, file InitializeArrays.mqh, line 168, col 24)" in 16 ms'. This is referring to 'InputIndicatorPeriod'. With H8 specified, why is that and is this a cause for failure of '.ini' file? 

Thanks so much. 

 

Thank you for this excellently documented and easy to understand presentation.


daveM

 
zeno:

Hello Anatoli,

Thank you for sharing this great EA.

Don't be disappointed if you don't get a reply,  Anatoli is Russian and he didn't make this thread,  he may not even be aware of it. Try a PM instead.
Reason: