Errors, bugs, questions - page 504

 
Vigor:

Does the code optimizer have limitations on the size of the object tree?

I get a "tree optimization error" at the compilation stage when the number of objects is increased.

P.S. In debug mode it compiles.

Can you attach an example of the source code in the servicedesk ticket? The code will be removed after verification.

Most likely, it is because of the long functions, but you'd better send us the code so that we could look into it ourselves and fix the error. It will help many traders.

 
Valmars:

First, what is the sense of forcefully downloading the history in the tester? The tester itself will download the necessary and accessible history from the server, if there are requests in the code or trade operations for the necessary symbols. Since your code is empty, the tester doesn't need to simulate ticks for other symbols, except for the symbol, on which the testing is performed. And that's what the tester downloaded its history. And since there is no history (in the tester), we end up with 0.

Second, even if you augment the code by calling the entire history for all symbols, it is unlikely that the downloading of all of the available history for all symbols will be successful, and a failure will occur somewhere. Since the tester uses the base of terminal quotes, it needs to download the necessary history.
The thing is that when the tester tries to simulate ticks for other symbols, the log starts to flood with messages like contains 0 M1 records, because there is no history on this date and the log grows to unimaginable volumes, and to avoid these errors, I need to know the starting date of the history, and when requested, the function SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE) returns 0
 

Can you tell me what the values in the Result column mean when the target function Balance + min Drawdown is selected?

 
tol64:

Can you tell me what the values in the Result column mean when the target function Balance + min Drawdown is selected?

If you look at the Help in the terminal, many questions would disappear because it's all written there

Optimization criterion

An optimization criterion is a certain factor, whose value defines the quality of the tested set of input parameters. The higher the value of the optimization criterion is, the better the testing result with the given set of parameters is considered to be. This parameter can be selected on the "Settings" tab to the right of the "Optimization" field.

The optimization criterion is required only for the genetic algorithm.

The following optimization criteria are available:

  • Maximum balance - the optimisation indicator is the maximum balance value;
  • Balance + Maximum Profitability - the maximum value of the balance multiplied by the profitability is the optimized criterion;
  • Balance +Maximum expected payoff - the product of balance by expected payoff is considered as an indicator;
  • Balance + minimum drawdown - drawdown level (100% - Drawdown)*Balance is taken into account besides the balance value;
  • Balance + maximum recovery factor - the value is the product of balance by the recovery factor;
  • Balance + maximumSharpe Ratio - the index is the product of the balance by the Sharpe ratio;
  • Custom optimization criterion - when selecting this option, the value of OnTester() in the Expert Advisor will be considered as the optimization criterion. This option allows a user to use any custom indicator for the optimization.


 
sergey1294:

Thank you. )) For some reason I was thinking of the Minimum Drawdown criterion, not Balance + Minimum Drawdown. ))

 
sergey1294:
The thing is that when the tester tries to simulate ticks for other symbols, the log starts to be filled with messages like contains 0 M1 records because there is no history on this date and the log grows to unimaginable amounts and I need to know the date of history to avoid these errors, but when you request the function SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE) returns 0

As far as I understand, before testing, the tester creates a market environment for the connected account (the last connected if there is no connection to the server), checks synchronization of data with the server (again, if there is a connection), uploads the missing quotes from the start date of testing (if there is a connection), creates a test sequence of quotes for all necessary symbols, and only then begins testing. What if he does not manage to download the necessary history (for example, because of the lack of history on the server or because of no connection with the server ) ? It tells you honestly. No, you don't have to.

Next, you want to get the starting date of the history on the server (in the tester). It seems that this property is not included in the market environment of the tester, although it could have been saved from the server. Is it an error? I think not. After the beginning of testing, the tester cannot access the server (through the terminal) to download the quotes you need. All that is available, is already loaded by the tester during the initialization phase of the testing process and the test sequence has already been formed and it cannot be changed. Instead of SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE), in your case, I think you can use SeriesInfoInteger(symbol,0,SERIES_FIRSTDATE), it should work in the tester.

 
Renat:

Can you attach an example of the source code in the servicedesk ticket? The code will be removed after verification.

Most likely, it is about long functions, but you'd better send us the code so that we can look into it and fix the error. It will help many traders.

Ok, attached 2 options with "code generation error" and "tree optimization error". The onInit function is really long (~1000 lines of generated code).

Ticket #217917.

Документация по MQL5: Основы языка / Функции / Функции обработки событий
Документация по MQL5: Основы языка / Функции / Функции обработки событий
  • www.mql5.com
Основы языка / Функции / Функции обработки событий - Документация по MQL5
 
Vigor:

Ok, attached 2 variants with "code generation error" and "tree optimization error". The onInit function is really long (~1000 lines of generated code).

Ticket #217917

Thanks, we'll look into it on Monday.
 
Valmars:

As far as I understand, before testing, the tester creates a market environment for the connected account (the last connected if there is no connection to the server), checks synchronization of data with the server (again, if there is a connection), uploads the missing quotes from the start date of testing (if there is a connection), creates a test sequence of quotes for all necessary symbols, and only then begins testing. What if he does not manage to download the necessary history (for example, because of the lack of history on the server or because of no connection with the server ) ? It tells you honestly. No, you don't have to.

Next, you want to get the starting date of the history on the server (in the tester). It seems that this property is not included in the market environment of the tester, although it could have been saved from the server. Is it an error? I think not. After the beginning of testing, the tester cannot access the server (through the terminal) to download the quotes you need. All that is available, is already loaded by the tester during the initialization phase of the testing process and the test sequence has already been formed and it cannot be changed. Instead of SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE), in your case, I think you can use SeriesInfoInteger(symbol,0,SERIES_FIRSTDATE), it should work in the tester.


The same function returns zero. I triedSERIES_TERMINAL_FIRSTDATE too. The conclusion is that theSeriesInfoInteger function doesn't work in the tester. It works only for the instrument on which the test is running. Maybe you have any ideas how to run the test for instruments with different start date of history when selecting the interval "All history".
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Информация об исторических данных по инструменту
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Информация об исторических данных по инструменту
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Информация об исторических данных по инструменту - Документация по MQL5
 
Again the time on the terminal has jumped to GMT+0 and it should be GMT+1, it has already been discussed. Please correct it.
Reason: