How to optimize an advisor

Unfortunately, there are practically no trading advisors in the financial markets that could constantly produce stable results and would not require reconfiguration or optimization.

For many beginners, the concept of optimization may be associated with something complex and incomprehensible. In fact, optimization is a simple adjustment of parameters to the current market conditions.

So, when a trader adjusts a certain indicator on history, he is also engaged in optimization, but it just looks a little different.

Why optimization is necessary

The fact is that the market moves in a kind of cycles and it tends to pick up certain paces and maneuvers that were repeated earlier.

Thus, many beginners, and even pros, often encounter a situation when a forgotten draining advisor suddenly begins to bring huge profits, and the newest development, on the contrary, begins to drain the deposit.

RECOMMENDED BROKER
the best choice at the moment

This situation is not uncommon, but there is only one reason for it - the market has changed. Of course, changes in the market are quite difficult to notice visually, but if a currency pair begins to shorten its movement corridor or enters flat, the advisor immediately reacts to these changes.

Actually, if a trader can adjust the strategy on a weekly basis based on his observations and visualization on history, then with advisors the situation is completely different. For optimization, a strategy tester is used, which has a genetic algorithm function that can significantly speed up the optimization process.

Optimization model selection

If you have worked and encountered a strategy tester, then you probably know that the tester performs both testing and optimization according to one of three models. The first model, and it is the most inaccurate both in terms of testing and in terms of optimization, is “Control points”.

The essence of the model is that at the moment of price formation, data is taken from the nearest time frameA. Naturally, due to lack of data, it is simply impossible to optimize using this model.

The second model, which is present in the strategy tester, is called “At opening prices”. Unlike the previous model, the amount of data is much greater, since already formed bars are used. Unfortunately, if your advisor opens positions based on price and can also close inside the bar itself, this approach is not for you.

If you are absolutely sure that your advisor opens a position only when the candle closes, then this model is right for you, and it is very fast.

The third and most accurate model is called “All ticks”. The essence of the model is that when processing parameters, data is taken from all time frames, which ensures the accuracy of optimization of experts trading inside the bar (scalpers, pipsers). This optimization method has the highest accuracy, but is also the most time-consuming.


You can select a testing model using the slide-out menu in the strategy tester opposite the “Model” form. Also, to start optimization, do not forget to check the “Optimization” checkbox.
 
Correct Expert Advisor Optimization Algorithm

Many beginners who are faced with optimization for the first time make a huge mistake when they optimize for the current moment. This approach is comparable to playing roulette, since you cannot check your settings in any way, because they are already adjusted to the Forex market.

Instead, professionals use the forward test method. The essence of this scheme is to divide the historical period into optimization and testing. So, if we take the historical section as 100 percent, then on the 709 percent section the settings are optimized, and on the remaining 25 percent the forward test of your received settings is performed. This way you can see how your selected parameters might behave in the future.

To begin the optimization process itself, you should set up a number of criteria that will help cut off unrealistic optimization results. To do this, in the strategy tester, go to the advisor settings and switch the tab to “Optimization”. In this tab, you can set the limit values ​​for the minimum balance, maximum profit in percentage, minimum margin level and maximum drawdown, continuous loss and continuous number of losing trades, as well as continuous winning, continuous number of won trades.

 
Then go directly to the EA input parameters. As you can see, there are two columns in the settings, namely Value and Start. To optimize, specify the minimum parameter optimization value in the Strat line, and the maximum in the Value line. Also, do not forget to check the box next to the line whose settings will be optimized.

 
Next, click “Ok” and start optimization. After you start, the tester will give you information on the time and number of samples. Once optimization is complete, go to the “Optimization Results” section and select a couple of acceptable results.

 
After you select acceptable parameters, conduct a forward history test and if it turns out to be satisfactory, then you can safely set these settings. Remember, the longer you optimize, the more stable the settings will be. You can download advisors in the section http://time-forex.com/sovetniki
Joomla templates by a4joomla