Errors, bugs, questions - page 1371

 

Dear developers, don't pass by :)

The trading platform is MetaTrader 4. The process of optimizing EAs is a run with different parameters, which are specified in input parameters of EA (input, sinput or extern). I want to know, with every iteration of the optimizer, which variables declared on the global scope are re-created (reset)? Or what is declared globally is created once and lives until the end of the entire optimization process?

 
Konstantin Karpov:

Dear developers, don't pass by :)

Trading platform MetaTrader 4. The process of optimizing EAs is a run with different parameters, which are specified in input parameters of EA (input, sinput or extern). I want to know, with every iteration of the optimizer, which variables declared on the global scope are re-created (reset)? Or what is declared at the global level is created once and lives until the end of the whole optimization process?

From the reference to global variables:

A variable declared outside of all functions is placed in the global scope. Such variables can be accessed from anywhere in the program. Such variables are located in the global memory pool, so their lifetime coincides with the lifetime of the program.

Область видимости и время жизни переменных - Документация на MQL4
  • docs.mql4.com
Область видимости и время жизни переменных - Документация на MQL4
 
Tapochun:

From the help about global variables:

A variable declared outside of all functions is placed in the global scope. Such variables can be accessed from anywhere in the program. Such variables are located in the global memory pool, so their lifetime coincides with the lifetime of the program.

I know that, but the question is...
 
Konstantin Karpov:

Dear developers, don't pass by :)

The trading platform is MetaTrader 4. The process of optimizing EAs is a run with different parameters, which are specified in input parameters of EA (input, sinput or extern). I want to know, with every iteration of the optimizer, which variables declared on the global scope are re-created (reset)? Or what is declared globally is created once and lives until the end of the entire optimization process?

Variables declared globally are initialized with initial values (or cleared, if there is no explicit initialization) before each optimization step (and before each single test). Constructors are called for class objects
 
Slawa:
The variables declared globally are initialized with initial values (or zeroed, if there is no explicit initialization) before each optimization step (and before each single test)

I see, and static variables are zeroed?

By the way, why is deinitialization of class objects displayed in print only once - at the end of the whole optimization cycle? In theory it should happen at each iteration of optimization process...

 
Konstantin Karpov:

I see, are static variables zeroed?

By the way, why does the print print show deinitialization of class objects only once - at the end of the whole optimization cycle?

Static variables are zeroed or initialized with initial values, if there is an explicit initialization.

During optimization, logging is disabled, so as not to clog the log files. Logging is switched back on when the optimisation is complete.

Apparently, it is enabled before the last deinit. Or the last deinit is performed too late. You need to look at

 
Sorry for the offtops, who should I complain to about freelancer from freelance section? Picked a performer from the top developers https://www.mql5.com/ru/job/developers, contacted him directly by mail, described the job, made an advance payment, he took it, now exceeded the deadline and does not get in touch. I need the public to recognise the "hero"!
 
boitzov.asd2015:
Sorry for the offtops, who should I complain to about freelancer from freelance section? Picked a performer from the top developers https://www.mql5.com/ru/job/developers, contacted him directly by mail, described the job, made an advance payment, he took it, now exceeded the deadline and does not get in touch. We need the public to recognize the "hero"!
In your profile, the section "Service Desk". And this is not an off-topic, this is the purpose of the thread, to ask questions.
 
Tapochun:
In your profile, the "Service Desk" section. And this is not an off-topic, the topic is created for the purpose of asking questions.
"To directly inform the developers about bugs in MQL5 or MetaTrader 5 or give your suggestions for improvement." Will my application be accepted there?
 
boitzov.asd2015:
"To directly report bugs in MQL5 or MetaTrader 5 or give your suggestions for improvement to the developers." Will my application be accepted there?
I haven't used the "Jobs" section personally, but as far as I know, it has "Arbitrage". You either go there if you're not satisfied with something or - in servicedesk. Although, I do not see your work in your profile.
Reason: