Discussion of article "Parallel Particle Swarm Optimization" - page 2

 
Экспериментальный статус MT5Bridge.mqh означает, что его работоспособность широко не проверялась. Это исследование из разряда Proof Of the Concept. Используйте исходный код для отладки и исправления ошибок.
One of the applications.
Библиотеки: BestInterval
Библиотеки: BestInterval
  • 2020.08.15
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: BestInterval
 

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Обсуждение статьи "Параллельная оптимизация методом роя частиц (Particle Swarm Optimization)"

Stanislav Korotky, 2020.08.24 10:45

I am attaching a slightly modified header file and an example of a test EA. The Settings class, helper functors, and templated event handlers have been added to the ParticleSwarmEmbed.mqh file. It is assumed that the user is satisfied with the default implementation. Then the code of the Expert Advisor ExprBotPSOEmbed.mq5 is greatly simplified. It is enough to describe your trading calculation and to forward the handlers to the PPSO_EventHandlers class. The input variables also contain the PSO dynamics adjustment factors (inertia, etc.), as well as the disabling of index files.
Файлы:

 

Hey, great topic, unfortunately when trying to connect all the pieces, compiler still throws errors:

It looks as if due to some update it is not possible now? If you could look into it, that would be nice.

 
Tobias Johannes Zimmer #:

Hey, great topic, unfortunately when trying to connect all the pieces, compiler still throws errors:

The vector and the position compilation error belong together since position is an array of the dimensions (degrees of freedom/inputs) I guess which could be inserted into the calculate method, but due to some update it is not possible now? And then the positions[] array can't be casted into a positionValue... if you could look into it, that would be nice.

Then there are things about worker functor where I have no clue what seems to be the problem.

I hope there is an easy way to fix this. If there isn't I would totally understand if you would prefer not to.

Just make a context substitution of "vector" to "_vector" in ParticleSwarmParallel.mqh or/and ParticleSwarmEmbed.mqh.

MQL5 has introduced vector type since the publication, this broke many sources codes where the identifier vector has been used already.

 
Stanislav Korotky #:

Just make a context substitution of "vector" to "_vector" in ParticleSwarmParallel.mqh or/and ParticleSwarmEmbed.mqh.

MQL5 has introduced vector type since the publication, this broke many sources codes where the identifier vector has been used already.

Oh of course vector shouldn't be a type... thank you, that works.
 
cannot convert  to enum
 
dustovshio #:
cannot convert  to enum

MT4Orders and Virtual are 3-rd party libraries. You should check for latest versions on their pages in the codebase.

 
Stanislav Korotky #:

MT4Orders and Virtual are 3-rd party libraries. You should check for latest versions on their pages in the codebase.

I downloaded the lasted MT4Orders and it compiled.  However now it gives me this error after I load the PSO set files. There is no error for standard optimize mode.  Is it possible to change the dates to optimize to the last bar instead of the last day? 



 
dustovshio #:

I downloaded the lasted MT4Orders and it compiled.  However now it gives me this error after I load the PSO set files. There is no error for standard optimize mode.  Is it possible to change the dates to optimize to the last bar instead of the last day? 

If you're asking about "incorrect input parameters" error, you can double click optimization table on the pass which gives the error, and get the single pass log for detailed description what goes wrong. Also you did not provide info about which EA and with what settings you've tried to run.

I have already told you that the last-day-out limitation is imposed by the tester itself.