MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading, Strategy Testing and Optimization Articles

To post a new article, please log in or register

Do you like the article?
Share it with others -
post a link to it!

Use new possibilities of MetaTrader 5

MQL5 Wizard: Creating Expert Advisors without Programming [ru]

MetaQuotes | 11 January, 2011


Introduction

When you create automated trading systems it is necessary to write algorithms of analyzing market situation and generating trading signals, algorithms of trailing your open positions, as well as systems of money management and risk management.

Once the modules' code is written the most difficult task is to assemble all parts and to debug the source code of trading robot. Here the key role is played by the architecture of modules interaction: if it is built poorly, the majority of time will be spent on finding and correcting errors, and if you replace the algorithm of any module it will lead to rewriting the entire source code.

In MQL5 using the object-oriented approach significantly eases writing and testing of automated trading systems.

MetaQuotes Software Corp. has developed classes to implement trading strategies. Now you can generate Expert Advisors code automatically directly in MetaEditor by selecting the required Trade Signals (currently there are 13 of them), Trailing (4) and Money Management (5) modules. By combining these modules you can get many variants of ready-to-use trading systems.

You can also use your own classes with implementation of any of these modules. Create them by your own or order them via the Jobs service.

In this article we will consider automatic generation of Expert Advisor's source code using MQL5 Wizard. And there will be nothing to program!


1. Creating Trading Robot Using MQL5 Wizard

Expert Advisor's source code is generated using MQL5 Wizard in MetaEditor.

Basic classes of trading strategies are located in the '\<client_terminal_directory>\MQL5\Include\Expert\' folder. Ready-to-use algorithms of trade signals classes, classes of trailing open positions and classes of money and risk management are located in the Signal, Trailing and Money sub-folders. MQL5 Wizard parses files in these folders and uses them to generate Expert Advisor's code.

To launch MQL5 Wizard you need to click "New" button on the toolbar or select "New" from the "File" menu (or simply press Ctrl+N):

Figure 1. Launching MQL5 Wizard

Figure 1. Launching MQL5 Wizard

Then select the type of the program you want to create. In our case select the "Expert Advisor (generate)" option:

Figure 2. Selecting the Type of Program

Figure 2. Selecting the Type of Program

Step 1. General Properties of Expert Advisor

Next opens the dialog box, where you can set the general properties of Expert Advisor:

Figure 3. General Properties of Expert Advisor

Figure 3. General Properties of Expert Advisor

Specify the name of your Expert Advisor, the author's name and the link to your web-site in the "Name", "Author" and "Link" fields (respectively).

Expert Advisor also has the following input parameters:

  • Title (the string type) - name of Expert Advisor.
  • MagicNumber (the int type) - ID of Expert Advisor.
  • EveryTick (the bool type) - mode of operations processing. If EveryTick = true, then Expert Advisor will check conditions and make trade operations on every tick. Otherwise these operations will be performed only when a new bar for the working timeframe appears.

On the next step select the type of trade signals, on which the expert will trade.

Step 2. Select the Module of Trade Signals

Algorithm of opening and closing positions is determined by the module of trade signals. Trade signals modules contain rules of opening/closing/reversing positions.

The Standard Library has ready-to-use Modules of trade signals:

  1. CSignalADX_MA - Signals based on price crossover with MA confirmed by ADX.
  2. CSignalAlligator - Signals based on the Alligator.
  3. CSignalCandles - Signals based on reversal candlestick patterns.
  4. CSignalCandlesRSI - Signals based on reversal candlestick patterns confirmed by RSI.
  5. CSignalCandlesStoch - Signals based on reversal candlestick patterns confirmed by Stochastic.
  6. CSignalCrossEMA - Signals based on crossover of two EMA.
  7. CSignalCrossMA - Signals based on crossover of two MA.
  8. CSignalMA - Signals based on price crossover with MA.
  9. CSignalMACD - Signals based on crossover of main and signal MACD lines.
  10. CSignalMovingAverage - Signals based on price crossover with SMA.
  11. CSignal3EMA - Signals based on three EMA.
  12. CSignal2EMA_ITF - Signals based on crossover of two EMA with intraday time filter.

Type of trade signals is selected from the "Name" dropdown list.

We will select module that generates trading signals based on crossover of two exponentially smoothed moving averages:

  • Opening long position (and closing short position): fast MA crosses slow MA bottom-up on generated bar.
  • Opening short position (and closing long position): fast MA crosses slow MA top-down on generated bar.

Figure 4. Select the Algorithm of Trade Signals

Figure 4. Select the Algorithm of Trade Signals

Each type of trade signal has its own parameters that you can specify in the Parameters section:

Figure 5. Setting up Parameters of Selected Trade Signals' Algorithm

Figure 5. Setting up Parameters of Selected Trade Signals' Algorithm

In our case, these are periods of fast (FastPeriod) and slow (SlowPeriod) exponentially smoothed moving averages.

We will use the default values.

There are two modes of parameters creation. You can switch between them by double-clicking left mouse button on parameter's icon. If parameter has the highlighted icon , then it will be available as the input variable of Expert Advisor. Such parameters further can be used for expert optimization in Strategy Tester. If parameter has the gray icon , then it will have the fixed value that you can't modify from Expert Advisor's properties.

Step 3. Select the Module of Trailing Open Positions

The next step is to select the algorithm of trailing open positions (Trailing Stop). Using the trailing allows you to save earned profit.

The Standard Library provides several ways of trailing open positions:

  1. CTrailingNone - Trailing Stop is not used.
  2. CTrailingFixedPips - Trailing Stop based on fixed Stop Level.
  3. CTrailingMA - Trailing Stop based on MA.
  4. CTrailingPSAR - Trailing Stop based on Parabolic SAR.  

In our Expert Advisor select "Trailing Stop based on fixed Stop Level":

Figure 6. Select the Algorithm of Trailing Open Positions

Figure 6. Select the Algorithm of Trailing Open Positions

This type of trailing has two parameters: the StopLevel and ProfitLevel (in points for quotes with 2 and 4 digits after comma), which will be used to trail open positions:

Figure 7. Setting Parameters of Selected Algorithm of Trailing Open Positions

Figure 7. Setting Parameters of Selected Algorithm of Trailing Open Positions

Step 4. Select the Module of Money and Risk Management

On the last step you need to select system of money and risk management, which will be used in your Expert Advisor.

The purpose of this algorithm is to determine the trading volume (in lots) for trading operations, and also the risk management. When the loss value exceeds allowed limit (for example, 10% of equity), the money and risk managing module will forcibly close the unprofitable position.

The Standard Library provides several ready-to-use implementations of money and risk management algorithms:

  1. CMoneyFixedLot - Trading with fixed trade volume.
  2. CMoneyFixedMargin - Trading with fixed margin.
  3. CMoneyFixedRisk - Trading with fixed risk.
  4. CMoneyNone - Trading with minimal allowed trade volume.
  5. CMoneySizeOptimized - Trading with optimized trade volume.

Figure 8. Select the Algorithm of Money and Risk Management

Figure 8. Select the Algorithm of Money and Risk Management

Select the 'Trading with fixed trade volume' algorithm.

The module we have selected has two parameters:

  • Lots - trading volume in lots.
  • Percent - maximal allowed percentage of risk.

Figure 9. Setting Parameters of Selected Algorithm of Money and Risk Management

Figure 9. Setting Parameters of Selected Algorithm of Money and Risk Management

After clicking "Finish" the TestExpert.mq5 file will appear in the \<client_terminal_directory>\MQL5\Experts\ folder. The filename corresponds to the specified name of Expert Advisor.


2. The Structure of Expert Advisor Created Using MQL5 Wizard

The source code of Expert Advisor, generated by MQL5 wizard, looks as follows:

//+------------------------------------------------------------------+
//|                                                   TestExpert.mq5 |
//|                        Copyright 2010, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2010, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Include                                                          |
//+------------------------------------------------------------------+
#include <Expert\Expert.mqh>
#include <Expert\Signal\SignalCrossEMA.mqh>
#include <Expert\Trailing\TrailingFixedPips.mqh>
#include <Expert\Money\MoneyFixedLot.mqh>
//+------------------------------------------------------------------+
//| Inputs                                                           |
//+------------------------------------------------------------------+
//--- inputs for expert
input string  Inp_Expert_Title                  ="TestExpert";
int          Expert_MagicNumber                =22047;
bool         Expert_EveryTick                  =false;
//--- inputs for signal
input int    Inp_Signal_CrossEMA_FastPeriod    =12;
input int    Inp_Signal_CrossEMA_SlowPeriod    =24;
//--- inputs for trailing
input int    Inp_Trailing_FixedPips_StopLevel  =30;
input int    Inp_Trailing_FixedPips_ProfitLevel=50;
//--- inputs for money
input double Inp_Money_FixLot_Percent          =10.0;
input double Inp_Money_FixLot_Lots             =0.1;
//+------------------------------------------------------------------+
//| Global expert object                                             |
//+------------------------------------------------------------------+
CExpert ExtExpert;
//+------------------------------------------------------------------+
//| Initialization function of the expert                            |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- Initializing expert
   if(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
      ExtExpert.Deinit();
      return(-1);
     }
//--- Creation of signal object
   CSignalCrossEMA *signal=new CSignalCrossEMA;
   if(signal==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating signal");
      ExtExpert.Deinit();
      return(-2);
     }
//--- Add signal to expert (will be deleted automatically))
   if(!ExtExpert.InitSignal(signal))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing signal");
      ExtExpert.Deinit();
      return(-3);
     }
//--- Set signal parameters
   signal.FastPeriod(Inp_Signal_CrossEMA_FastPeriod);
   signal.SlowPeriod(Inp_Signal_CrossEMA_SlowPeriod);
//--- Check signal parameters
   if(!signal.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error signal parameters");
      ExtExpert.Deinit();
      return(-4);
     }
//--- Creation of trailing object
   CTrailingFixedPips *trailing=new CTrailingFixedPips;
   if(trailing==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating trailing");
      ExtExpert.Deinit();
      return(-5);
     }
//--- Add trailing to expert (will be deleted automatically))
   if(!ExtExpert.InitTrailing(trailing))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing trailing");
      ExtExpert.Deinit();
      return(-6);
     }
//--- Set trailing parameters
   trailing.StopLevel(Inp_Trailing_FixedPips_StopLevel);
   trailing.ProfitLevel(Inp_Trailing_FixedPips_ProfitLevel);
//--- Check trailing parameters
   if(!trailing.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error trailing parameters");
      ExtExpert.Deinit();
      return(-7);
     }
//--- Creation of money object
   CMoneyFixedLot *money=new CMoneyFixedLot;
   if(money==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating money");
      ExtExpert.Deinit();
      return(-8);
     }
//--- Add money to expert (will be deleted automatically))
   if(!ExtExpert.InitMoney(money))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing money");
      ExtExpert.Deinit();
      return(-9);
     }
//--- Set money parameters
   money.Percent(Inp_Money_FixLot_Percent);
   money.Lots(Inp_Money_FixLot_Lots);
//--- Check money parameters
   if(!money.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error money parameters");
      ExtExpert.Deinit();
      return(-10);
     }
//--- Tuning of all necessary indicators
   if(!ExtExpert.InitIndicators())
     {
      //--- failed
      printf(__FUNCTION__+": error initializing indicators");
      ExtExpert.Deinit();
      return(-11);
     }
//--- ok
   return(0);
  }
//+------------------------------------------------------------------+
//| Deinitialization function of the expert                          |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   ExtExpert.Deinit();
  }
//+------------------------------------------------------------------+
//| "Tick" event handler function                                    |
//+------------------------------------------------------------------+
void OnTick()
  {
   ExtExpert.OnTick();
  }
//+------------------------------------------------------------------+
//| "Trade" event handler function                                   |
//+------------------------------------------------------------------+
void OnTrade()
  {
   ExtExpert.OnTrade();
  }
//+------------------------------------------------------------------+
//| "Timer" event handler function                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
   ExtExpert.OnTimer();
  }
//+------------------------------------------------------------------+

Expert Advisor's code consists of several sections.

Section describing program properties:

#property copyright "Copyright 2010, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"

Included files:

#include <Expert\Expert.mqh>
#include <Expert\Signal\SignalCrossEMA.mqh>
#include <Expert\Trailing\TrailingFixedPips.mqh>
#include <Expert\Money\MoneyFixedLot.mqh>

The code of the CExpert class (its instance is used in Expert Advisor) is located in the Expert.mqh file.  

The SignalCrossEMA.mqh file contains the source code of the selected trade signals class - CSignalCrossEMA. The TrailingFixedPips.mqh file contains the source code of trailing open positions algorithm class - CTrailingFixedPips. Money and risk management will be implemented by the CMoneyFixedLot class contained in the MoneyFixedLot.mqh file.

Next come the input parameters of Expert Advisor:

//--- inputs for expert
input string  Inp_Expert_Title                  ="TestExpert";
int          Expert_MagicNumber                =22047;
bool         Expert_EveryTick                  =false;
//--- inputs for signal
input int    Inp_Signal_CrossEMA_FastPeriod    =12;
input int    Inp_Signal_CrossEMA_SlowPeriod    =24;
//--- inputs for trailing
input int    Inp_Trailing_FixedPips_StopLevel  =30;
input int    Inp_Trailing_FixedPips_ProfitLevel=50;
//--- inputs for money
input double Inp_Money_FixLot_Percent          =10.0;
input double Inp_Money_FixLot_Lots             =0.1;

The first three parameters (Inp_Expert_Title, Expert_MagicNumber and Expert_EveryTick) are general. They are always present regardless of the selected trading signals, trailing, and money and risk management algorithms.

The string Inp_Expert_Title parameter specifies the name of Expert Advisor, Expert_MagicNumber specifies its ID (this value will be used in trade requests' parameters), and the Expert_EveryTick parameter is used to set EA's working mode. If Expert_EveryTick is set to true, Expert Advisor will call handler functions (check for trade conditions, commit trade operations, trailing open position) each time a new tick is coming for the working symbol.

After the general parameters of Expert Advisor come the input parameters for selected trade signals algorithm (in our case it is Inp_Signal_CrossEMA_FastPeriod and Inp_Signal_CrossEMA_SlowPeriod - periods of fast and slow moving averages used in the CSignalCrossEMA class).

We have selected the CTrailingStopFixedPips class of trailing open positions. It trails open position at fixed distance determined by Stop Loss and Take Profit levels, whose values are defined in "normal" 2/4 digit points. When price moves towards the open position by distance, that exceeds the number of points set by the Inp_Trailing_FixedPips_StopLevel level, Expert Advisor modifies the values of the Stop Loss and Take Profit levels (if Inp_Trailing_FixedPips_ProfitLevel > 0).  

The Inp_Money_FixLot_Percent and Inp_Money_FixLot_Lots input parameters correspond to parameters of the algorithm with fixed trade lot, implemented in the CMoneyFixedLot class. In our case the trade will be performed with fixed volume equal to the value of Inp_Money_FixLot_Lots.

The CMoneyFixedLot class also implements the algorithm of risk management: if there is a loss (as a given percent of current equity) specified in the Inp_Money_FixLot_Percent parameter, the CMoneyFixedLot class will recommend the Expert Advisor to forcibly close of unprofitable position, and so it will be done.

After input parameters of Expert Advisor the ExtExpert object of the CExpert class is declared:

CExpert ExtExpert;

This is the instance of trading strategy class.

Being an instance of the CExpert class, the ExtExpert object contains references to child objects of the CExpertSignal (the base class of trade signals), the CExpertMoney (the base class of money and risk management) and the CExpertTrailing (the base class of trailing open positions) classes. In addition the CExpert class contains instances of the CExpertTrade, SSymbolInfo, CAccountInfo, CPositionInfo, COrderInfo classes and the CIndicators container.

To set parameters of Expert Advisor you have to create instances of corresponding classes and to specify references to created objects in the ExtExpert class.

Let's consider the OnInit function of Expert Advisor initialization. Here we initialize and configure properties of the ExtExpert class.

1. Initialization of the ExtExpert class:

//--- Initializing expert
   if(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
      ExtExpert.Deinit();
      return(-1);
     }
The ExtExpert object is initialized using the Init method. Here we set the symbol, timeframe, flag of method calling on every tick, ID of Expert Advisor, and also create and initialize private objects of classes (on this stage the CExpertSignal, CExpertMoney and CExpertTrailing classes are used as the signals, trailing and money management objects).

If the ExtExpert object doesn't initialize successfully, Expert Advisor will be terminated with return code -1.

2. Create and configure the Signal object properties

//--- Creation of signal object
   CSignalCrossEMA *signal=new CSignalCrossEMA;
   if(signal==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating signal");
      ExtExpert.Deinit();
      return(-2);
     }
//--- Add signal to expert (will be deleted automatically))
   if(!ExtExpert.InitSignal(signal))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing signal");
      ExtExpert.Deinit();
      return(-3);
     }
//--- Set signal parameters
   signal.FastPeriod(Inp_Signal_CrossEMA_FastPeriod);
   signal.SlowPeriod(Inp_Signal_CrossEMA_SlowPeriod);
//--- Check signal parameters
   if(!signal.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error signal parameters");
      ExtExpert.Deinit();
      return(-4);
     }

Configuration of the trade signals object consists of 4 steps:

  • Creation of signal object
  • Adding signal to expert
  • Setting signal parameters
  • Checking signal parameters

If the ExtExpert object doesn't initialize successfully, Expert Advisor will be terminated with return code ( from -2 to -4), that depends on what step an error occurred.

Depending on how the parameters were specified in MQL5 Wizard, the appropriate code is generated.

//--- Set signal parameters
   signal.FastPeriod(25);                                  //--- Parameter was set as fixed in MQL5 Wizard
                                                                 //--- (gray icon - fixed value equal to 25)
   signal.SlowPeriod(Inp_Signal_CrossEMA_SlowPeriod);     //--- Parameter was set as input variable
                                                                 //--- (blue icon - input parameter of Expert Advisor)

If parameter is fixed and its value does not differ from default value, it will not be written in the generated code. In such case the default value of parameter (specified in the corresponding class) will be used.

3. Create and configure the Trailing object properties

//--- Creation of trailing object
   CTrailingFixedPips *trailing=new CTrailingFixedPips;
   if(trailing==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating trailing");
      ExtExpert.Deinit();
      return(-5);
     }
//--- Add trailing to expert (will be deleted automatically))
   if(!ExtExpert.InitTrailing(trailing))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing trailing");
      ExtExpert.Deinit();
      return(-6);
     }
//--- Set trailing parameters
   trailing.StopLevel(Inp_Trailing_FixedPips_StopLevel);
   trailing.ProfitLevel(Inp_Trailing_FixedPips_ProfitLevel);
//--- Check trailing parameters
   if(!trailing.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error trailing parameters");
      ExtExpert.Deinit();
      return(-7);
     }

Configuration of the trailing object also consists of 4 steps:

  • Creation of trailing object
  • Adding trailing to expert
  • Setting trailing parameters
  • Checking trailing parameters

If the trailing object doesn't initialize successfully, Expert Advisor will be terminated with return code ( from -5 to -7), that depends on what step an error occurred.

4. Create and configure the money object properties

//--- Creation of money object
   CMoneyFixedLot *money=new CMoneyFixedLot;
   if(money==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating money");
      ExtExpert.Deinit();
      return(-8);
     }
//--- Add money to expert (will be deleted automatically))
   if(!ExtExpert.InitMoney(money))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing money");
      ExtExpert.Deinit();
      return(-9);
     }
//--- Set money parameters
   money.Percent(Inp_Money_FixLot_Percent);
   money.Lots(Inp_Money_FixLot_Lots);
//--- Check money parameters
   if(!money.ValidationSettings())
     {
      //--- failed
      printf(__FUNCTION__+": error money parameters");
      ExtExpert.Deinit();
      return(-10);
     }

Configuration of the money and risk management object also consists of 4 steps:

  • Creation of money object
  • Adding money to expert
  • Setting money parameters
  • Checking money parameters

If the money object doesn't initialize successfully, Expert Advisor will be terminated with return code ( from -8 to -10), that depends on what step an error occurred.

5. Initialize all indicators used in classes

//--- Tuning of all necessary indicators
   if(!ExtExpert.InitIndicators())
     {
      //--- failed
      printf(__FUNCTION__+": error initializing indicators");
      ExtExpert.Deinit();
      return(-11);
     }
//--- OK
   return(0);  

After you create and initialize objects of trade signals, trailing and money management, the InitIndicators method of ExtExpert object is called. It initializes indicators used in the signal, trailing and money objects.

The OnDeinit, OnTick, OnTrade and OnTimer events handling is performed by calling the appropriate methods of the ExtExpert class.

If you want to know the details of the CExpert methods implementation, you can view the indicator's source code, located in '\<client_terminal_directory>\MQL5\Include\Expert\expert.mqh'.


3. Checking Created Expert Advisor in MetaTrader 5 Strategy Tester

If all components of Standard Library are present, the code of generated Expert Advisor compiles successfully:

Figure 10. Successful Compilation of Expert Advisor's Source Code Created in MQL5 Wizard

Figure 10. Successful Compilation of Expert Advisor's Source Code Created in MQL5 Wizard

The resulting Expert Advisor will trade according to selected algorithms of trade signals, trailing open positions and money and risk management.

You can check how your newly created trading system works using Strategy Tester from MetaTrader 5 client terminal. On figure 11 you can see the results of testing on historical data with default settings (EURUSD, H1, Last year):

Figure 11. Results of Expert Advisor Testing on Historical Data (EURUSD, H1, Last year)

Figure 11. Results of Expert Advisor Testing on Historical Data (EURUSD, H1, Last year)


The best set of Expert Advisor's parameters can be found after optimization in MetaTrader 5 Strategy Tester.


Conclusion

Using the classes of trading strategies significantly eases creation and testing of your trading ideas. Now the entire source code of Expert Advisor can be constructed directly in MetaEditor using its MQL5 Wizard on the basis of ready-to-use Standard Library modules or your own modules. 

If you don't want to or can't write your own trade signals module, you can always benefit from the Jobs service and order either entire trading robot, or only required modules. This approach gives additional benefits:

  • Development cost of separate module should be lower than the cost of entire Expert Advisor.
  • The resulting module can be reused to create both a standalone Expert Advisor and a whole family of trading robots (based on this module) using the MQL5 Wizard.
  • Ordered module must strictly comply to additional requirements of MQL5 Wizard, and this gives additional control over the quality of code.



Last comments | Go to discussion (2)
Rashid
Rosh | 4 Aug 2011 at 13:08
Unfortunately, this moldue doesn't include in current version of Standard Library. See discuss for the article MQL5 Wizard: New Version

geli96
geli96 | 12 Jun 2011 at 22:48

I do not see SignalCrossEMA in my expert/money directory

What is wrong?

Thanks

Eli


MQL5 Wizard: How to Create a Module of Trading Signals

The article discusses how to write your own class of trading signals with the implementation of signals on the crossing of the price and the moving average, and how to include it to the generator of trading strategies of the MQL5 Wizard, as well as describes the structure and format of the description of the generated class for the MQL5 Wizard.

Create your own Market Watch using the Standard Library Classes

The new MetaTrader 5 client terminal and the MQL5 Language provides new opportunities for presenting visual information to the trader. In this article, we propose a universal and extensible set of classes, which handles all the work of organizing displaying of the arbitrary text information on the chart. The example of Market Watch indicator is presented.