Libraries: MultiTester - page 17

 

I looked at my own, indeed for some symbols did not appear files with tick history, looked through the log and there it is:

2020.02.12 16:02:30.144 Core 1  NZDUSD : real ticks begin from 2017.01.02 00:00:00

Now I understand, the rest was a simulation.


By the way MultiTester does not switch the symbol on minimised terminal, it is better to add opening a window before starting a new pass. I have added such a function to fInit for now.

bool ActivateTerminalWindow(){
   HANDLE ChartWindow = (HANDLE)ChartGetInteger(0, CHART_WINDOW_HANDLE);
   if(ChartWindow){
      HANDLE TerminalWindow = GetParent(ChartWindow);
      TerminalWindow = GetParent(TerminalWindow);
      TerminalWindow = GetParent(TerminalWindow);
      if(TerminalWindow){
         ShowWindow(TerminalWindow, 3);
         return true;
      }
   }
   return false;
}
 
Evgenii Kuznetsov:

By the way MultiTester doesn't switch the symbol on minimised terminal, better to add opening a window before starting a new pass.

I haven't checked it, haven't encountered it.

 
fxsaber:

In the end I did this. Form a batch of tasks from ini-files and send it for execution.

Forum on trading, automated trading systems and testing trading strategies

Expert Advisors: Validate

fxsaber, 2020.02.22 10:46 AM

When I need to perform a lot of different Tester tasks, I use Validate.


1. I set up a task in the Tester that I want to run.

2. In the Settings tab, I press CTRL+C. All the settings appear on the clipboard.

3. Using CTRL+V, I copy these settings into an ini-file, which I place in the folder with tasks.

4. This is how I create the required number of tasks - ini-files (four tasks on the screen).


5. When starting Validate, I specify the name of the folder where the tasks are located.


That's it, now Validate with all its tricks will execute these tasks.


I use MultiTester-derivatives only in specific cases, when I need to create tasks as I run them.

I recommend using Validate to run a batch of any ready-made tasks.

 

Please share your experience on how to do GA correctly. I encountered a situation when GA finds only one of the required local extrema.

For a particular TS/symbol I understand where to look, so I do GA on different ranges. But in general, it is not clear how to proceed.

 
fxsaber:

Please share your experience on how to do GA correctly. I encountered a situation when GA finds only one of the required local extrema.

For a particular TS/symbol I understand where to look, so I do GA on different ranges. But in general, it is not clear how to proceed.

I think there was something on the topic here - https://www.mql5.com/ru/forum/87536.

Or call the author(@Andrey Dik).

Чемпионат Алгоритмов Оптимизации.
Чемпионат Алгоритмов Оптимизации.
  • 2016.06.09
  • www.mql5.com
Чемпионат алгоритмов оптимизации задуман как соревнование для людей ищущих, любознательных, для которых стоять на месте означает движение назад...
 
Andrey Khatimlianskii:

I think there was something on the subject here - https://www.mql5.com/ru/forum/87536

Or call the author(@Andrey Dik).

I am asking questions in the context of using MT5-Tester. Therefore, custom Optimisation algorithms are not suitable.

 
fxsaber:

Please share your experience on how to do GA correctly. I encountered a situation when GA finds only one of the required local extrema.

For a particular TS/symbol I understand where to look, so I do GA on different ranges. But in general it is not clear how to proceed.

I now stop testing if the drawdown is large

and to cheer up the GA a bit, I'm doing this:

#define  TESTER_STOP(ret) { EA_STOP = true; TesterStop(); return ret; }
double OnTester()
{
   srand((int)TimeCurrent());
// if(StartHour==20 && CountHours==22) return (-(rand() % 1000));// I use this if the GA started to converge around one maximum by running time

   if(EA_STOP) return (-(rand() % 1000));                                                               // unsuccessful test, interrupted by a large drawdown

   int o_count = 0;
   for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
   {
      if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) && OrderType() < 2) o_count++;
   }
   if(o_count < 160) return (-(rand() % 1000));                                                         // looking for at least 160 deals in six months

   return(AccountInfoDouble(ACCOUNT_BALANCE));
}


void OnTick()
{
   if(IS_OPTIMIZATION)
   {
      double balance = AccountInfoDouble(ACCOUNT_BALANCE);
      MaxBalance = fmax(MaxBalance, balance);
      if(MaxBalance - balance > 200) TESTER_STOP();                                                     // stop the test at a drawdown of $200
   }


This is the method I've been testing for the last week, now I'm very happy with GA.

 

I in my optimiser repeat GA until for 4 times there is no improvement on the last result. It may take a dozen or more attempts. I usually get good results. Though it takes a long time.

When re-optimising on current dates, I can get a new improved local maximum, and if not - I start from the old one and refine it for the new market by slow optimisation (I choose a group of interdependent variables and iteratively optimise each combination in pairs).

In addition, I introduced micro penalties (additional mutagen) in OnTester. In this case, GA performs more passes due to more frequent mutations, and as a result, new maxima are found more often.

// Micro penalties to choose a smaller parameter value when results are equal
res -= BP * 0.0001 / 200;       // Divide by the optimisation range (0...200)
 
Igor Makanu:

I'm stopping testing now if there's a big drawdown.

and to cheer up the GA a bit, I'm doing this:

I have been testing for the last week using this method, now I am very satisfied with GA.

I do it approximately the same way. The drawdown control is for faster optimisation, and the control of the number of trades is for better directing the GA, filtering out the rubbish.

But this is not enough.


ZY It is cheaper.

TesterStatistics(STAT_TRADES)
 
Edgar Akhmadeev:

introduced micro penalties (additional mutagen) in OnTester. In this case, GA performs more passes due to more frequent mutations, and as a result, new maxima are found more often.

Please clarify.