MetaTrader 5 MT5 Expert Advisors TradeXpert – EA MetaTrader 5

TradeXpert – EA MetaTrader 5

The project has been created for the MQL5 Best Graphic Panel Contest.

Project purpose is to extend the functions of MetaTrader 5 client terminal with economical use of chart place.

The Expert Advisor has 4 independent panels with different functions. Any panel can be hiden/restored or deleted from the chart (Log Panel)

The minimum resolution for the demonstation: 600×500.

TradeXpert Control Panel


The Expert Advisor uses the following fonts:

  • Lucida Console
  • Wingdings
  • Wingdings 3
  • Arial Black

Of course, the program will work if there isn’t these fonts installed, but the design will different and some messages will shown incorrectly.
If you haven’t these fonts in your operation system, please install them.

The list of available fonts is shown in the Graphic object properties of MetaTrader 5 client terminal.


The Expert Advisor has has 4 panels, 3 of them are located in the main window:

  • Settings panel
  • Control panel
  • Information panel

The last panel (Log Panel) is located in the separate subwindow, it can be hidden.

1. Log panel

TradeXpert Log Panel

To show logs panel, it’s necessary to run the TradeXpertLog indicator, the comments of Expert Advisor are shown there.

For the optimal use of workspace, it can be added to subwindow of some other indicator. All logs of the Expert Advisor are printed in client terminal logs (Print). It is recommended to use the Logs when trading, it will allow you to see the order processing.

This panel can be used for the debug and for the comments of the other panels. The benefit of a such comments is the following: you will have the separate logging window to focus on the necessary information.

The time is shown correctly, it will work in holydays.

The available settings are:

  • Font size;
  • Color;
  • Line length;
  • Maximum number of lines.

2. Trade panel (control panel)

MQL5 Trade Panel

The purpose of the panel is trading.

The list of available operations:

  • Buy specified volume;
  • Sell specified volume;
  • Buy specified volume with setting of Take Profit level. If the value of volume is 0, it sets the Take Profit level only;
  • Sell specified volume with setting of Take Profit level. If the value of volume is 0, it sets Take Profit level only;
  • buy specified volume with setting of Stop Loss level. If the value of volume is 0, it sets Stop Loss level only;
  • Sell specified volume with setting of Stop Loss level. If the value of volume is 0, it sets Stop Loss level only;
  • BuyStop, BuyLimit, SellStop, SellLimit orders placing;
  • Close opened position on the current symbol;
  • Reverse of the opened position on the current symbol. The old Stop Loss and Take Profit levels is set to 0.
Alternative:   EMA Cross Contest Hedged - EA MetaTrader 5

There is some feature in setting of Stop levels.

For example, if we have a buy position (0.5 lots) and sell 0.1 lots with setting of Take Profit or Stop Loss, the Expert Advisor will not set them. But the specified trade volume exceeds 0.5 (for example 0.7), it will set new values of Take Profit and Stop Loss levels. As I remember, the behaviour of client terminal is the same.

If the volume is 0, the Expert Advisor will set the Take Profit and Stop Loss levels (if correct).

The trade volume can be specified here. I haven’t implemented the automatic calculation of trade volume.

The first, there are many method for its calculation.
Secondly, this function doesn’t used in manual trading.
If you don’t like it, you can add your own implementation.
The Expert Advisor doesn’t check the margin.

After the setting of trade volume its value is modified according the current symbol settings, so if please recheck the value of trade volume before trading.

Available settings:

  • Order filling type
  • Color scheme
  • Panel animation delay

Some details about the order filling type. Three order filling types are supported (see MQL5 Reference):

  • ORDER_FILLING_FOK — “Fill or Kill”
  • ORDER_FILLING_IOC — “Available”
  • ORDER_FILLING_RETURN — “Available+”

3. Information panel

It shows the symbol information and state of the opened position.

MQL5 Information Panel

Availiable settings:

  • Color scheme
  • Animation delay
  • Number of bars for calculation of minimal and maximal values of spread
  • Time. It can show the local time, server time, CET, EST, MSK, GMT.
Alternative:   Roboost v1 - EA MetaTrader 4

4. Settings Panel

It contains the setting of the Expert Advisor. You can easily add your own settings by adding few lines of code.

Settings panel

The settings with inrease/decrease options can be changed using the “Up” and “Down” keys on the keyboard.
Available settings:

  • Color scheme
The demonstation (it’s better to use 480p resolution):


According to the Contest Rules (IV.2), the number of .mqh files is limited by 10, so I have prepared two versions, located in the archive files:

  •, the original version with initial structure of files;
  •, all .mqh files are combined in a large file.

I recommend you to use the original version.

Happy trading!

📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks