Optimization is a search for a certain set of parameters of a trading system, which are ingrained into the advisor, in order for the trader to have minimal risk and high profits.

mt4 ea optimization

This search is done using algorithms which are exact and well thought out. The results of optimization gains the trader:

  1. Large profits
  2. Minimal risk
  3. A large number of profitable trades
  4. And the optimal combinations of the options above


The algorithm for the advisor does not require any “human interaction”, which means that it has certain blocks for forming an entry signal, an exit signal, and money management using the following techniques:

  1. Actively or passively limits loss and profits
  2. Automatically determines the size of deposits which are allocated for a position
  3. Uses a system of hedging which diversifies positions to open using deals in other instruments.


The process of optimizations allows us to find optimal parameters for the advisor, using many combinations of cases from the automatic run of the trading system on the specifically selected traders history.
Optimization - is the constant and required process which allows the trader to calibrate their parameters of their specific automatic trading strategy based on the changes in the market.

The values of the trading system found at the start, showing positive results, will lose relevance due to the constant shift of market cycles due to:

  1. Important Global News
  2. Political events
  3. Seasonality



A trader must understand that in the world around him, there is no possible way to get 100% correct readings consistently. Foreign exchange or exchange markets are no exception to these rules. Optimization is a big advantage that allows you to constantly stay ahead using a proven strategy to gain advantages over others.
To maintain the potential of a developed strategy, it is enough for a trader to periodically “twist” the input parameters of advisors. This is a process that has been greatly simplified with the development of technology that automates trading in financial markets.

Selection of a section for optimization of strategy parameters:

  1. After choosing the parameters that should be optimized, the trader should choose the historical section for finding the optimal parameters.
  2. This is the interval specified by the calendar date in the “Use date” tester line. When choosing a segment, the trader must adhere to the following principles:
  3. The reference point should coincide with the period of decreasing the effectiveness of the strategy, it will help determine the analysis of the equity curve of the report, obtained from the "Account History".



If the trader decided to optimize the parameters for any other reasons, he can choose a segment based on the general recommendations below, to which any test should correspond to.

  1. The length of the segment must be at least three calendar months
  2. Segments should contain a clear uptrend, flat, downtrend
  3. It is advisable to extend the testing period in order to achieve a proportional length of the flat zones, up and down trends
  4. Strategy optimization carried out with a certain regularity can significantly improve the strategy.

Video: MT4 Expert Advisor Optimization


Yes, it is possible to optimize a strategy with a large amount of historical data and to receive a large array of parameters which can be used over and over again. However, it is better to tweak these parameters as the market is constantly changing, and important news releases are also constantly impacting the market.

The stop loss and take profit which could've been used last week could become obsolete due to the fluctuations in the market. You can re optimize the mt4 expert advisor, you can do this manually using the MetaTrader4 program, by giving parameters which you would like to optimize and to follow through with the optimization.

For example, you can do this on the weekend and assign a new value which will be used the following week. When I say reoptimization, I do not mean a drastic change of all parameters in the advisor. The expert advisor needs to be optimized, with the parameters of all of the indicators or other statistical parameters that were previously chosen, which are tweaked during specific time intervals such as every week, or perhaps every three days.

As the trading system works on a smaller time frame, you can reoptimize more frequently, for example scalping can be reoptimized every few days but a system which is used when something is in the market for a long time, needs to be reoptimized more rarely.

As i said before we can optimize manually or use an Auto-Optimizing program which can set, tweak, and reoptimize certain parameters automatically during selected time intervals, for example 5 pm in New York when SWAPs are counted and the market is not active.

Video: MT4 Auto Optimizer Software

During this time such a program can reoptimize and the MT4 EA  will be started with new parameters in a fully automatic mode. It will automatically receive parameters and tweak them. The expert advisor can then use these to trade. This will save your time and will make your advisor more profitable and reliable. Also, this Auto Optimizer Software can be used for an advisor of which the source code is available to you and for an advisor for which you do not have a source code but the ex4 file. [We were asked many questions about if we can decomple ex4 and create MQ4, which we cannot do, but instead we use standard methods.]