Libraries: MultiTester - page 27

 
fxsaber:

The MTTester library has long allowed you to do absolutely everything that a user can do via GUI.

I am mastering MTTester.

Connecting only

#include <fxsaber\MultiTester\MTTester.mqh>

I can't understand how to wait for the end of testing? I run such lines

MTTESTER::Run( NULL,SimvolTorg[i]);
Sleep(10000);
MTTESTER::IsReady();

As a result of waiting for the end of testing does not happen. Do I need to solve this issue myself? Or is there already a ready solution ?

 
pivomoe:

As a result, waiting for the end of the test does not happen. Do I need to solve this issue myself ? Or is there already a ready solution ?

There were examples above. I use only four functions myself:

MTTESTER::IsReady - Тестер готов к запуску.
MTTESTER::ClickStart - Нажать на кнопку Старт/Стоп.
MTTESTER::GetSettings - получить полные текушие настройки тестера.
MTTESTER::SetSettings2 - задать любые настройки тестера.
 
while(1)
        {
         Sleep(1000);
         if( MTTESTER::IsReady() ) break;
        }
Thank you. It helped.
 
pivomoe:
Thank you. It helped.

And four more for more advanced use.

MTTESTER::GetPassesDone - количество выполненных прогонов идущей оптимизации.
MTTESTER::GetLastOptCache - последний opt-файл.
MTTESTER::GetLastTstCache - последний tst-файл.
MTTESTER::CloseNotChart - закрывает график оптимизации.


I don't use anything else.

 
Can you tell me if there is a possibility to add a function - in the case of disabled optimisation when testing an already optimised EA in the form of automatic clicking of tabs in the tester "chart" and "backtest" with pauses of 15 seconds between the change of the tested pair and timeframe? If in an optimised Expert Advisor it is necessary to test many pairs on many timeframes, it is not possible to use a multi-tester because it is necessary to make sure on each instrument in the correctness of the entered indicators from the optimisation. Or I can insert a pause somewhere to have time to review the results of the past test. Thanks
 
Il'ya Matviyenko:
Can you tell me if there is a possibility to add a function - in the case of disabled optimisation when testing an already optimised EA in the form of automatic clicking of tabs in the tester "chart" and "backtest" with pauses of 15 seconds between the change of the tested pair and timeframe? If in an optimised Expert Advisor it is necessary to test many pairs on many timeframes, it is not possible to use a multi-tester because it is necessary to make sure on each instrument in the correctness of the entered indicators from the optimisation. Or somewhere to insert a pause to have time to view the results of the past test. Thanks

I haven't even tried switching between tabs, as it is too complicated for me. Maybe someone can do it and share it here. No luck so far.

 
fxsaber:

I haven't even tried switching between tabs, as it's too complicated for me. Maybe someone can do it and share it here. No luck so far.

There was (maybe still is) such a code

user32::SendMessageW(user32::GetDlgItem(Handle, 0x2712), WM_LBUTTONDOWN, 1, 0x17007C); // Selecting the "Settings" tab

Other tabs should be similar. Or am I wrong?

 
traveller00:

There was (may still be) such a code

That's right! I forgot.

 

Everything turned out to be much simpler. In MultiTester.mqh it is enough to add:

.....................

void OnTimer()
{
static const int Size = TesterSettings.GetSize();
static bool IsRun = false;
static int Pos = 0;
static datetime StartTime = 0;
static bool Init = false;
static int Attempts = 0;
static int Errors = 0;
if(MessageBox("Continue?",MB_OK)==IDOK) {
if (!Size || IsStopped())
{
EventKillTimer();
ExpertRemove();

}

................

and you can admire the intermediate test results as much as you like

 
Il'ya Matviyenko:

Everything turned out to be much simpler. In MultiTester.mqh it is enough to add:

and you can admire the intermediate test results as much as you like

This is the reason why everything is open source.