Learning and writing together in MQL5 - page 39

 
THANK YOU!!!
 

There is a lot of documentation, and often things are left unread or misunderstood. Everything is gradually learned through the process of writing in the language. Thank you!

I have tried and am trying to use the documentation, that's how I write!

 
And let's get back to my sheep... This way there is no error at all
Type=PositionGetInteger(POSITION_TYPE);

But it is written in the help that the function can output the bool type, and the variable to be assigned should be fed to it in the second turn, as it is written in the help.

This variant is not possible in case ofPOSITION_TYPE identifier?

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
 
Dimka-novitsek:
And let's get back to my sheep... This way there is no error at all

But it is written in the help that the function can output the bool type, and the variable to be assigned should be fed to it in the second turn, as it is written in the help.

This variant is not possible in case ofPOSITION_TYPE identifier?

There are two versions of the function. The first one we considered, with one parameter. The second variant of the function returns a bool, while this variant requires a variable of the long type as the second parameter. The required value, in case of successful execution of the function, is written into this variable. Then, this variable must be converted to the type of the already existing variable Type.
 
Thank you!!!
 
Gentlemen, how to stop optimization process programmatically? Suppose, for example, during optimization with genetic algorithm an internal error occurs in some pass in the Expert Advisor's code that cannot be caught by any other method but during "genetic chaos". So, how to correctly stop optimization at this particular pass so that you can analyze this pass with current input parameters visually and catch the internal error?
Генетические алгоритмы - это просто!
Генетические алгоритмы - это просто!
  • 2010.05.25
  • Andrey Dik
  • www.mql5.com
В статье автор расскажет об эволюционных вычислениях с использованием генетического алгоритма собственной реализации. Будет показано на примерах функционирование алгоритма, даны практические рекомендации по его использованию.
 
Try to output a set of parameters and internal error sign to the file for each pass. Then, knowing this set of parameters, run the visceral test and call ExpertRemove() at the right time.
 
Rosh:

Try to output a set of parameters and internal error sign to file for each pass. Then, knowing this set of parameters, run the visceral test and call ExpertRemove() at the right moment.
Then a related question. If the optimization is done in the cloud, is there any way to output anything to a local file?
 
wtvirtual:
A related question then. If the optimisation takes place in the cloud, is it possible to output anything to a local file?
No. But you can use functions to handle the results of the optimisation
 
Good evening! Sorry, what would make an indicator handle redraw with the arrival of new ticks or at least bars if it's created in it's init? Really, just want to understand. It's somehow unrealistic to write it in the inite!