Download MetaTrader 5

MQL5 Wizard for Dummies

17 May 2011, 12:11
MetaQuotes Software Corp.
8 820

In early 2011 we released the first version of the MQL5 Wizard. This new application provides traders a simple and convenient tool to automatically generate trading robots. Any MetaTrader 5 user can create a custom Expert Advisor without even knowing how to program in MQL5.

In the new version of the Wizard we have expanded the functionality of the program. Now it enables you to create Expert Advisors based on a combination of several signals. This innovation allows the use of sophisticated analysis in an Expert Advisor to get detailed accurate signals. Nevertheless, this innovation does not complicate the process of generating an EA. It still implies a step-by-step selection of required parameters as a base for EA construction.

Let's consider each step separately and go through all the steps for creating an Expert Advisor. First you will need to define the tool and the timeframe, on which the EA will trade: EUR/USD and M10. We will use the following signals:

  • EMA('EURUSD',M10,31) - An exponential moving average;
  • Stochastic('EURUSD',M10,8,3,3) - Stochastic oscillator;
  • EMA('EURUSD',H1,24) - An exponential moving average from another timeframe to confirm the first EMA;
  • Stochastic('EURJPY',H4,8,3,3) - Stochastic oscillator from another symbol and timeframe to confirm the first one;
  • IntradayTimeFilter – A time filter, which reveals the efficiency of all other signals during certain hours and days of the week.

Thus, we have outlined the basic parameters for our Expert Advisor. Now we can start working in the MQL5 Wizard. To start the program, open the MetaEditor program and click "Create" in the "File" tab of the main menu. In the appeared window, select "Generate Expert Advisor”:

Generate Expert Advisor

In the next window, specify the symbol and the timeframe, on which the EA will trade. If we leave the default current value, we will receive a universal Expert Advisor able to trade on any symbol and timeframe to which it is connected. But we want to create an EA for intraday trading on EURUSD, as if applied to other instruments it may produce unexpected results. Therefore specify EURUSD and M10.

General Properties of the Expert Advisor

Now proceed to the most interesting step - select the signals, based on which our Expert Advisor will trade. At this point the standard library includes ready-made modules of 20 trading signals, which are based on the logic of standard indicators. We select the necessary symbols among them.

Ready-made Modules of Trading Signals

Then, configure the parameters for each signal we have chosen - from the MA to IntradayTimeFilter.

Signals of Moving Average

Each selected signal has its own set of parameters. For example, for the exponential MA we need to specify its period (31), its shift from the current bar (0), the averaging method (Exponential), the price to apply the MA (Close price) and the weight of the signal (1.0).

A detailed description of each trading signal can be found in the MQL5 Reference.

Selected Signals

After we've set up the parameters of all signals, our Expert Advisor is almost ready. Now, we only need to configure trailing stop and money management modules. However, this step is beyond the scope of this article. Therefore, our Expert Advisor will be constructed without trailing, and will trade the fixed lot.

For further study on how to configure these parameters, please read the article MQL5 Wizard: Creating Expert Advisors without Programming.

After all above steps, we must select a money management strategy and return to the MetaEditor where the code of the resulting Expert Advisor is available.

Code of the Resulting Expert Advisor

To compile the EA, press "Compile" in the control panel. After this, start the MetaTrader 5 Client Terminal and run the Expert Advisor by selecting it in the Navigator -> Expert Advisors.

Created Expert Advisor in MetaTrader 5 Strategy Tester

So we've created a full-fledged Expert Advisor with minimum time and effort. Now any MetaTrader 5 user can create an EA just as easy and quick.

The MQL5 Wizard is a powerful tool for creating trading robots. Now anyone can create a fully functional Expert Advisor regardless of programming skills and experience. In a few clicks you select the options you want - and the Expert Advisor created will be trading according to your strategy.

Try MQL5 Wizard today and create EAs with ease according to your specific trading strategy!

Download MetaTrader 5

Translated from Russian by MetaQuotes Software Corp.
Original article:

Step on New Rails: Custom Indicators in MQL5 Step on New Rails: Custom Indicators in MQL5

I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.

Here Comes the New MetaTrader 5 and MQL5 Here Comes the New MetaTrader 5 and MQL5

This is just a brief review of MetaTrader 5. I can't describe all the system's new features for such a short time period - the testing started on 2009.09.09. This is a symbolical date, and I am sure it will be a lucky number. A few days have passed since I got the beta version of the MetaTrader 5 terminal and MQL5. I haven't managed to try all its features, but I am already impressed.

False trigger protection for Trading Robot False trigger protection for Trading Robot

Profitability of trading systems is defined not only by logic and precision of analyzing the financial instrument dynamics, but also by the quality of the performance algorithm of this logic. False trigger is typical for low quality performance of the main logic of a trading robot. Ways of solving the specified problem are considered in this article.

Using text files for storing input parameters of Expert Advisors, indicators and scripts Using text files for storing input parameters of Expert Advisors, indicators and scripts

The article describes the application of text files for storing dynamic objects, arrays and other variables used as properties of Expert Advisors, indicators and scripts. The files serve as a convenient addition to the functionality of standard tools offered by MQL languages.