Forex trading how to optimize expert advisors in mt4

How to Properly Optimize an Expert Advisor (EA) in MT4

You can place a checkbox to the far left of the setting to be optimized. All settings that are not checked will use the number in the Value column.


  • oecd stock options?
  • An excellent training about Investing & Trading.
  • Expert Advisors | EAs in MetaTrader 4 | easyMarkets;
  • hk93 stock options.
  • About these Metatrader Expert Advisors....

Note: it is best to optimize with no more than 3 settings checked at a time. Your optimizer will be quicker and your comparison of results will be easier to read and decipher. When you are ready to optimize, you can hit the Start button at the bottom right of the Strategy Tester window. Depending on the period, the date range, the testing model and the number of settings to be optimized, it can take anywhere from a few minutes to several hours.

Optimization Types

If it is taking too long, consider changing the testing model, shortening the date range, optimizing with fewer settings, or using a larger step value. Once the optimization is finished, open the Optimization Results tab and double-click the Profit column or Profit Factor column to sort the results. It is also advisable to right click on Optimization of Results and deselect Skip Useless Results this only has to be done once and never again. In the above example, if I had kept the check on Skip Useless Results , it would have shown only shows 7 of the optimizations only the profitable ones , ignoring the negative results.

Though I could not copy and paste all the negative results here, I find them useful because they tell me that this strategy, as is, on this timeframe and currency, is more bad than good and only a few isolated combinations are profitable. For some dumb reason, Skip Useless Results is checked by default when it should be unchecked. Skip Useless Results skips all negative results and only gives you the positive results.

That severely limits the power of the optimizer. It is highly advantageous to be able to see all results, both the good and bad. Moreover, you want to be able to see all neighboring results of the profitable parameters in order to check for integrity and robustness of results. Generally, the most profitable parameters should have profitable neighboring parameters to be deemed robust.

It is always a good idea to right click on Optimization Results , and click Save as Report. This will allow you to save an html report of your optimization for later reference. The only problem with this method is that it does not save the parameter values that you have optimized — and so unless you have photographic memory, it is impossible to remember which pass number corresponded to which combination. There is an alternative workaround to this. You can write click on Optimization Results and click Copy All and then Paste the whole table in a worksheet of an Excel document.

If you plan to conduct several different types of optimizations, such as different combinations on different timeframes and currencies, laying them all out on different worksheets is the best way for you to compare and contrast the optimizations. Another way of viewing your results is seeing it in an optimization graph, which can be in either 2D or 3D. The 2D optimization plots the linear progression from the initial pass through to the final pass, and if the graph remains choppy throughout, it can confirm that there are no distinct combinations that rise above the rest.

You can also switch to the 3D mode and see shades of green that can help you spot those parameters that are not only good but living in the best greenest neighbourhood. Sounds very environmental. Generally speaking, there is more reason to attribute greater statistical worth to those parameters living in the greenest darker neighborhood.

That is, all surrounding paramaters of the optimal have deeper shades of green. If the optimal parameter reside in a dark green areas then its performance is less an anomaly due to over-optimization and more something real and worth paying attention to. Mouse can be hovered over any green block to see the pass number, parameter combination and values, and balance.

There is nice article written about how to avoid over-optimization by using the 3D graph to look for green neighborhoods. Hit the Start button again to backtest with the selected settings to view the equity curve and more statistics on the optimized strategy.

Finally, make sure you are aware of all the Steps to Minimize Overoptimization. Choosing the best model type The most ideal model type for backtesting and optimization is Every Tick because it is far more precise than the other two. Is this article helpful?

Prev Next. You might also like to read:. Share this page using your affiliate referral link Academy Home. MQL4 Logical Operators. MQL4 Trailing Stop. Learn Forex. How to Trade Forex: Step-by-step Guide. How Technical Analysis Works. How Fundamental Analysis Works. How Support and Resistance Works. How Trend Analysis Works. All Rights Reserved. This website uses cookies to improve your experience.


  1. etn trading strategy?
  2. The Best MT4 Forex Broker to run EAs (Expert Advisers) – e.
  3. Calaméo - How to Optimize an Expert Advisor Using MetaTrader 4 Strategy Tester;
  4. is trading binary options halal.
  5. ideal forex ernakulam.
  6. We'll assume you're ok with this, but you can opt-out if you wish. Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website.

    Slow Complete Algorithm

    Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent.