Errors, bugs, questions - page 432

 
gumgum:

290 in total and... on)

Total overkill makes 290.

I take it that there is no pass (real run) but it is fixed (if there are matches)?

Since you have chosen the genetic algorithm, it builds its own crossing plan and population output. The genetic optimiser algorithm is described in the relevant article.

It is unreasonable to run genetics with so few (290) passes. The genetic algorithm should be used with an initial enumeration of at least tens of thousands, preferably millions/billions/trillions, of variants.

Генетические алгоритмы - это просто!
Генетические алгоритмы - это просто!
  • 2010.05.25
  • Andrey Dik
  • www.mql5.com
В статье автор расскажет об эволюционных вычислениях с использованием генетического алгоритма собственной реализации. Будет показано на примерах функционирование алгоритма, даны практические рекомендации по его использованию.
 

MQL5 Reference Manual - Standard Library - Classes for organizing data - CArrayObj (on the website and in the help):

2. The memory management mechanism is disabled.

In this case, CArrayObj is not responsible for memory freeing

Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
Renat:

Yes, there is no need to test to the most recent existing date.

Choose a reasonable fixed end date in the form of 00:00 of the previous working day, or even the end of the previous working week. If you use the last day all the time, the end of schedule will float periodically, especially if the testing process is long using remote or claud agents.


I used Sunday as the end date. Where else is sensible? There is no trading on Sunday. What could float there???
 
MoneyJinn:
I used Sunday as the end date. Where else would it make sense? There is no trading on Sunday. What could float there???

Then perhaps the problem is at the other end of the story. What length of history do you need for the indicators to work? At the start of testing it is guaranteed, as I understand it, a hundred preceding bars.

If you need more, you should skip a part of history after the Expert Advisor's start with a length greater than[necessary_number_of_bars - 100]. This solved my problems with correlation of results of tester and optimizer.

 
MetaDriver:

Then perhaps the problem is at the other end of the story. What length of history do you need for the indicators to work? At the start of testing it is guaranteed, as I understand it, a hundred preceding bars.

If you need more, skip a piece of history after the Expert Advisor's start with a length greater than[necessary_number_of_bars - 100]. This solved my problems with matching tester and optimizer results.

Thanks, but from the screenshots we can see that the history for Friday (24.06.11) is lost when optimizing through the network

 

Not a crucial question, but still. String concatenation. The documentation describes two functions StringAdd and StringConcatenate.

The first one says,"The StringAdd() function works faster and more economical in memory than string concatenation by means of addition operations.

The second reads,"The StringConcatenate() function worksfaster and more economical in memory than string binding using addition operations due to the fact that no temporary variables of type string are used.

void OnStart() {
  string string1 = "sdfdsfjssdfads";
  string string2 = "bsadfasdfaaa";
  string string3 = "ssdfsdgasgsaggsda";
  string result;
  uint i, start, stop, length = 10000000;

  start = GetTickCount();
  for(i = 0; i < length; i++)
    result = string1 + string2 + string3;
  stop = GetTickCount();
  Print("№1 ", (stop-start), " milliseconds, i = ", i);
 
  start = GetTickCount();
  for(i = 0; i < length; i++) {
    StringAdd(result, string1);
    StringAdd(result, string2);
    StringAdd(result, string3);
  }
  stop = GetTickCount();
  Print("№2 ", (stop-start), " milliseconds, i = ", i);

  start = GetTickCount();
  for(i = 0; i < length; i++)
    StringConcatenate(result, string1, string2, string3);
  stop = GetTickCount();
  Print("№3 ", (stop-start), " milliseconds, i = ", i);
}

Result:

2011.06.26 19:10:55 test (EURUSD,H1)№1 2012 milliseconds, i = 10000000
2011.06.26 19:11:04 test (EURUSD,H1)#2 8269 milliseconds, i = 10000000
2011.06.26 19:11:10 test (EURUSD,H1)#3 6661 milliseconds, i = 10000000

It turns out, though, that usual addition is faster.

Документация по MQL5: Строковые функции / StringConcatenate
Документация по MQL5: Строковые функции / StringConcatenate
  • www.mql5.com
Строковые функции / StringConcatenate - Документация по MQL5
 
voix_kas:

It turns out, though, that normal addition is quicker.

The question has already arisen: https://www.mql5.com/ru/forum/58/page13#comment_59630 Have a look at the discussion later in the text. To the developers: the conclusion to be drawn is that there is a lack of coverage of this issue in the reference materials.
Изучаем и пишем вместе на MQL5
Изучаем и пишем вместе на MQL5
  • www.mql5.com
2) вывод всей возможной информации по инструментам, ордерам и др.
 
MoneyJinn:
I used Sunday as the deadline date. Where else is sensible? There's no Torg on Sunday. What could be floating around out there?

As this kind of question needs details, please create a ticket in the Service Desk with additional descriptions - we'll try to sort it out.

The problem, of course, is the history and its synchronicity.

 
voix_kas:

Not a crucial question, but still. String concatenation. The documentation describes two functions StringAdd and StringConcatenate.

The first one says,"The StringAdd() function works faster and more economical in memory than string concatenation by means of addition operations.

The second reads,"The StringConcatenate() function worksfaster and more economical in memory than string binding using addition operations due to the fact that no temporary variables of type string are used.

Result:

2011.06.26 19:10:55 test (EURUSD,H1)№1 2012 milliseconds, i = 10000000
2011.06.26 19:11:04 test (EURUSD,H1)#2 8269 milliseconds, i = 10000000
2011.06.26 19:11:10 test (EURUSD,H1)#3 6661 milliseconds, i = 10000000

It turns out, though, that normal addition is faster.

This seems to be a string concatenation optimization with +.

The compiler is undergoing some serious modifications concerning inclusion of the long expected optimization modes. We will show the results in a while.

 
Renat:

It looks like it's the string concatenation optimisation with + that's working.

We are now seriously changing the compiler in terms of enabling the long awaited optimization modes. We'll show you the results in a while.

I see. Well, if it's possible you'll describe it explicitly in the forum (I try to follow all threads).

So far in the algorithm I've left work "+".