Questions from a "dummy" - page 198

 
lazarev-d-m:

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.

 
lazarev-d-m:

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)

 
tor4en:

You mean that such a condition is sufficient:

if(MQL5InfoInteger(MQL5_TESTER)!=1 || MQL5InfoInteger(MQL5_VISUAL_MODE)==1)

Yes, that works too. Thank you.
 
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.

 
Thank you very much, Renat. Just what I needed!)
 
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.

 
There is a command in the configuration file to automatically close the terminal at the end of a test. Look in the help file.
 
papaklass:

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

 
sergeev:

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.

Reason: