Discussion of article "Optimization. A Few Simple Ideas"

 

New article Optimization. A Few Simple Ideas has been published:

The optimization process can require significant resources of your computer or even of the MQL5 Cloud Network test agents. This article comprises some simple ideas that I use for work facilitation and improvement of the MetaTrader 5 Strategy Tester. I got these ideas from the documentation, forum and articles.

Having found a consistent strategy for the EA to trade, we launch it on the EURUSD chart, right? Can the strategy be more profitable on other currency pairs? Are there any other currency pairs on which the strategy will give better results without necessity to increase the lot in geometric progression?

What will happen if we choose EURUSD and the standard H1 timeframe and then, if we are not happy with the result, change it for EURJPY on H4?

Besides, if we have a 64 bit operation system, which allows us to stop worrying about the speed of testing the system, do we forget about ludicrous combinations of the trading system entry parameters, which take part in the complete enumeration during optimization and which results we have to neglect in the final reports?

I have solved these "minor issues" myself and in this article share the effective solutions. I appreciate though that there may be other more optimal solutions.

Author: Jose Miguel Soriano Trujillo

 

My God, what a nightmare translation!

I wonder if the back translations into Spanish are the same?

Something needs to be done about this.

 
The translation has been adapted. Thanks for the comment!
 
A pleasure to read an article in a Spanish developer.
His proposal would also apply for an optimization of the times of entry ?. If I understood the article well. Is that I am a relative novice in the electronic programming.
A greeting and thanks
 
decolimper:
A pleasure to read an article in a Spanish developer.
His proposal would also apply for an optimization of the times of entry ?. If I understood the article well. Is that I am a relative novice in the electronic programming.
A greeting and thanks

If you are Spanish... we speak Spanish.

I understand that you are asking if I optimise the input periods.

The problem is that all the functions in the code must have a parameter that informs you of the time frame in which the EA works. It is not enough to leave PERIOD_CURRENT by default, you have to pass to all the functions that use the time period a global variable (marcoTF, for example) that stores the time frame in which the EA works.

For my code it doesn't matter in which graph you load the EA. It always works in the frame that I indicate in the input parameter that reports later to "marcoTF".

If you are Spanish ... speak in Spanish.

I understand that questions if I optimise input periods.

So it is and why the matter is; the problem is that all functions of the code must have a parameter to report to the timeframe in which the EA works. You can not use PERIOD_CURRENT default, pass all functions using the time a global variable (marcoTF, for example) that stores the time frame in which the EA works.

For my code is indifferent under what graphic upload the EA. Always work within the framework indicating on the input parameter subsequently informs "marcoTF".

[Deleted]  

Actually interesting... But it is not too much different from the usual optimisation according to the parameters chosen by the trader on his experience....

I am much more interested in the question of whether it is possible to automatically transfer optimised parameters to the EA settings...

I.e. is it possible to automatically optimise and re-optimise the Expert Advisor after a period of time defined by the trader?

 
josemiguel1812:

If you are Spanish... we speak Spanish.

I understand that you are asking if I optimise the input periods.

The problem is that all the functions in the code must have a parameter that informs you of the time frame in which the EA works. It is not enough to leave PERIOD_CURRENT by default, you have to pass to all the functions that use the time period a global variable (marcoTF, for example) that stores the time frame in which the EA works.

For my code it doesn't matter in which graph you load the EA. It always works in the frame that I indicate in the input parameter that reports later to "marcoTF".

If you are Spanish ... speak in Spanish.

I understand that questions if I optimise input periods.

So it is and why the matter is; the problem is that all functions of the code must have a parameter to report to the timeframe in which the EA works. You can not use PERIOD_CURRENT default, pass all functions using the time a global variable (marcoTF, for example) that stores the time frame in which the EA works.

For my code is indifferent under what graphic upload the EA. Always work within the framework indicating on the input parameter subsequently informs "marcoTF".

 
hello, Jose Miguel, I would like to get in touch with you by mail, is it possible, best regards
 
Very good article José! I've been looking for a way to optimise not only by timeframe, but also by assets. Congratulations on your initiative!!!

If you are interested, I have a suggestion that could be useful to you. Would it be interesting to optimise in this way?

External parameters to optimise:

Number of assets: 1
Assets: EURUSD

Or

Number of assets: 2
Assets: EURUSD; USDJPY
or
Asset1: EURUSD
Asset2: USDJPY

Etc.

Thus optimising the number of Number of assets and Assets. In your case, is the optimisation done individually for each asset or a setup for all assets at the same time?

Another way would be to automate the optimisation as soon as you run the EA on a chart. For EAs that only work by candle closes (in my case, for example), would it be possible to optimise by the candles on the chart, without using Strategy Tester?
 

A good article. I find it curious that I have also faced this problem with solutions very similar to yours. Another interesting line is the "virtual" optimisation presented in this article:

https://www.mql5.com/en/articles/143

In any case, thanks for fighting against programmer's loneliness :)

Adaptive Trading Systems and Their Use in the MetaTrader 5 Client Terminal
Adaptive Trading Systems and Their Use in the MetaTrader 5 Client Terminal
  • 2010.09.14
  • MetaQuotes Software Corp.
  • www.mql5.com
This article suggests a variant of an adaptive system that consists of many strategies, each of which performs its own "virtual" trade operations. Real trading is performed in accordance with the signals of a most profitable strategy at the moment. Thanks to using of the object-oriented approach, classes for working with data and trade classes of the Standard library, the architecture of the system appeared to be simple and scalable; now you can easily create and analyze the adaptive systems that include hundreds of trade strategies.
 
Jose:

A good article. I find it curious that I have also faced this problem with solutions very similar to yours. Another interesting line is the "virtual" optimisation presented in this article:

https://www.mql5.com/en/articles/143

In any case, thanks for fighting against programmer's loneliness :)

I do structured programming and I don't "read" object-oriented programming well.

I don't understand the strategy itself because I don't see how it gets the virtual result of all strategies on candle 1 to choose what I do when opening candle 0. On candle 100 (numbering from present to past), for example, if I can estimate the result on candle 98 "moving" into the future with the known history and the priceBID that the MT5 tester system will give me.... but on candle1 how do I estimate the virtual result?