How can a parameter to be optimised be influenced if its range depends on another optimised parameter? Call expertremove in oninit if the parameter is not suitable? What is the optimum way to speed up optimisation?
aharata: How can I influence the parameter to be optimized, if its range depends on another optimized parameter? Call expertremove in oninit if the parameter is not suitable? What is the best way to speed up the optimization?
Look at the ParameterSetRange and ParameterGetRange functions. They allow you to rewrite the parameter to be enumerated on the basis of the previously set non-numeric conditions.
For example, like this:
//--- input parameters
sinput int Param1=4; // хитрый параметр
sinput int Param2=30; // хитрый параметр
sinput bool Param3=false; // хитрый параметр
sinput long Counter=1; // а вот этот параметр мы и будем оптимизировать (синтетический счетчик)
//--- на основе Param1, Param2 и Param3 высчитаем хитрое количество проходов счетчика Counter
ParameterSetRange("Counter",true,0,0,1,1+long(Param3 ? (Param1*Param2):(Param1*2));
Note the use of sinput (static input) instead of input, which gives a blocked change "from" and "to" this parameter in the GUI. And similarly, the Counter parameter which is locked for changes using ParameterSetRange function is unlocked with setting of calculated limits.
You can use this mechanism to make very complex input conditions that can be used to spin up synthetic billing counters. Don't forget only that the parameter setting function works only in OnTesterInit.
Question about setting up a terminal startup cycle for testing using command line.
Current situation: 1. I am using the command line to start the terminal to optimize the Expert Advisor. 2. Terminal starts, optimizes and saves the result in xml file. 3. Manually close terminal 4. I edit ini file (change e.g. testing period)
5. Moving on to point 1.
Question: has anyone already been able to automate this process, including automatically selecting parameters for the ini file from a given list, and closing the terminal? Please share your ideas on how this could be done. The best option would be to offer a ready solution to automate the above process. Surely someone has already thought of it before me.
Renat, well make a STORAGE for the four, PLEASE. I have downloaded the Expert Advisor to my laptop, but I forgot about all the inludes. Now I sit here as a simple :) programmer, writing functions instead of debugging the Expert Advisor.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
from this condition comes out that it will perform in three situations:
1)When the tester is working
2)When the tester is NOT working
3)When visual tester works
so the function will always work, most likely you need to remove the second condition and connect the first and third with &&
Rather like this:
2 or (1 and 2). That's what I need. Not to be in tester, but in visual tester mode.
I'm sorry, but I think I just confused terminals and tested wrong code. My condition seems to work correctly.
so the function will always work, most likely you need to remove the second condition and connect the first and third with &&
You mean that this condition is sufficient:
if(MQL5InfoInteger(MQL5_TESTER)!=1 || MQL5InfoInteger(MQL5_VISUAL_MODE)==1)
You mean that such a condition is sufficient:
if(MQL5InfoInteger(MQL5_TESTER)!=1 || MQL5InfoInteger(MQL5_VISUAL_MODE)==1)
How can I influence the parameter to be optimized, if its range depends on another optimized parameter? Call expertremove in oninit if the parameter is not suitable? What is the best way to speed up the optimization?
Look at the ParameterSetRange and ParameterGetRange functions. They allow you to rewrite the parameter to be enumerated on the basis of the previously set non-numeric conditions.
For example, like this:
Note the use of sinput (static input) instead of input, which gives a blocked change "from" and "to" this parameter in the GUI. And similarly, the Counter parameter which is locked for changes using ParameterSetRange function is unlocked with setting of calculated limits.
You can use this mechanism to make very complex input conditions that can be used to spin up synthetic billing counters. Don't forget only that the parameter setting function works only in OnTesterInit.
Current situation:
1. I am using the command line to start the terminal to optimize the Expert Advisor.
2. Terminal starts, optimizes and saves the result in xml file.
3. Manually close terminal
4. I edit ini file (change e.g. testing period)
5. Moving on to point 1.
Question: has anyone already been able to automate this process, including automatically selecting parameters for the ini file from a given list, and closing the terminal? Please share your ideas on how this could be done. The best option would be to offer a ready solution to automate the above process. Surely someone has already thought of it before me.
Renat, well make a STORAGE for the four, PLEASE. I have downloaded the Expert Advisor to my laptop, but I forgot about all the inludes. Now I sit here as a simple :) programmer, writing functions instead of debugging the Expert Advisor.
My flash drive is our trusty STORAGE :)
SZY, well, and mail from time to time
The flash drive is our trusty STORAGE :)
ZS, and sometimes the mail.
Flash drive - I'd argue, they often break.
I have an external HDD that automatically syncs once a day (about 300 gigs of work files) If I go somewhere, toss it in my bag and I'm happy.
They say that ssd drives are virtually indestructible. But very expensive.