Expert Advisors

MT4 allows you to use automated trading strategies, known as expert advisors (EAs). You can select expert advisors to apply to your charts in the Navigator window.

To create your own expert advisors you use the MQL4 programming language. To get started, right-click Expert Advisor in the Navigator window, then select Create.

This opens MT4’s built-in MetaEditor, which displays the Expert Advisor Wizard.

Use the wizard to specify the type of the expert advisor you wish to create. Enter a name for your expert advisor, the developer’s name and the developer’s website in the General Properties window. Click Add to add a parameter to the expert advisor.

MT4 allows you to test an expert advisor before attaching it to your chart. The Strategy Tester shows you how an expert advisor would work on a selected instrument under certain market conditions. To access the Strategy Tester, click View and select Strategy Tester.

Select the EA you wish to test from the Expert Advisor drop-down menu, and the instrument you wish to run the test against from the Symbol menu.

Click Expert Properties to modify the settings before you run the test. Via the Optimization settings you can run multiple tests that mimic different market conditions.

Testing expert advisors

You can choose one of five models for optimization by using the Optimized Parameter drop-down menu on the Testing tab.

  • Balance indicates the smallest balance value in the deposit currency
  • Profit Factor determines the gross profit and gross loss of one trade
  • Expected Payoff shows the average profit/loss factor of one trade
  • Maximal Drawdown calculates the largest loss of one trade
  • Drawdown Percent determines the maximal drawdown of the initial deposit

Open an account now

It’s free to open an account, can take less than five minutes, and there’s no obligation to fund or trade

An award-winning service

Spread betting and CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Between 64-72% of retail investor accounts lose money when trading these products with this provider.
You should consider whether you understand how these products work and whether you can afford to take the high risk of losing your money.