MetaEditor Help

Settings

MetaEditor settings

MetaEditor provides multiple settings to help you conveniently customize your work in the development environment. To open the settings, click Options... Options... in the Tools menu (Ctrl+O).

MetaEditor settings

All settings are grouped in several tabs based on what they do:

  • General – general code editing settings: tab size, auto completion, auto list of names, etc.
  • Colors – colors for highlighting MQL4/MQL5 language syntax.
  • Font – settings of a text entered in MetaEditor.
  • Debug – program debugging settings.
  • MQL5.community – configuring connection to MQL5.community for accessing unique services, including MQL5 Storage.

General

This tab features general code editing settings: tab size, auto completion, auto list of names, etc.

General

The window contains the following parameters:

  • Tabulation – number of characters inserted when pressing Tab.
  • Insert spaces – enable/disable replacing tab characters with spaces.
  • String indices – enable/disable line numbering in the code editing window.
  • Auto indent – enable/disable auto indent when moving to the next line according to the indent of the previous one.
  • Auto parameters – enable/disable automatic opening of the function signature hint when you enter it.
  • Auto list names – enable/disable auto opening of a scrollable list of names of built-in and custom functions when entering the first characters of their names.
  • List names after "n" characters – set the number of characters followed by the auto list of names.
  • Insert () and closing } ] ) ' " – automatic insertion of parentheses after functions and closing parentheses and quotation marks when entering opening ones.
  • Highlight current line – when enabled, the current code line in the editing window is highlighted in gray.
  • Highlight matching brackets – when enabled, the background of matching parentheses is highlighted when the mouse cursor is placed between them.

It is recommended not to disable the "Insert spaces" option to save the code formatting when transferring to other editors.

Colors

The Colors tab configures highlighting MQL4/MQL5 language syntax when working with a source code.

Colors

The Elements block allows you to select MQL4/MQL5 language syntax elements, while the right part manages their display: Foreground, Background. The block below the settings shows an example of how this element will be displayed in the code editing window. Click Reset All to reset the syntax highlighting settings to default values.

Font

This tab configures the font type and size for displaying code in the editing window.

Font

The following setting blocks are available here:

  • Font – font type selected from the list of available ones.
  • Size – font size. The size can be selected from the list or entered manually.
  • Script – font encoding selected from the list of available ones.
  • Preview window – here we can see the final text appearance after applying the settings.
  • Bold – enable/disable display of an element in bold.

Debug

This tab allows you to configure general debugging and program profiling options.

Debug

The following settings are available here:

  • Use specified settings – enable/disable the use of certain settings for debugging and profiling programs. When starting debugging or profiling, the program will be launched on a chart with a specified symbol and period. When debugging on history, these parameters are used for visual testing. If this option is disabled, all the fields below are not editable.
  • Symbol – symbol chart to be used for debugging/profiling of programs.
  • Period – chart period to be used when debugging/profiling programs.
  • Date – period used to check a program when debugging in history. A visual testing is launched in the strategy tester on this period.
  • Execution – strategy tester allows you to emulate network delays during an Expert Advisor operation in order to bring testing closer to real conditions. A certain time delay is inserted between placing a trade request and its execution in the strategy tester. From the moment of sending a request till its execution, the price can change. This allows you to evaluate how trade processing speed affects the trading results. Select a delay to be used when debugging on history: no delay, a fixed value (one of the predefined values or a custom one) or a random value. For more information, please read the trading platform user guide.
  • Tick generation mode – used for debugging on history. For more information, please read the trading platform user guide.
  • Every tick – most accurate but the slowest mode. It simulates all ticks.
  • 1 minute OHLC – in this mode only 4 prices (Open, High, Low and Close) of each minute bar are emulated.
  • Open prices only – in this mode, OHLC prices are also simulated, however only the open price is used for testing/optimization.
  • Deposit – initial deposit currency and amount for debugging on history. Please note that cross rates for converting profit and margin to the specified deposit currency must be available on the account, to ensure proper debugging. Only symbols with the "Forex" or "Forex No Leverage" calculation type can be used as cross rates.
  • Leverage – leverage used for debugging on history data.

If no symbol and chart period for debugging/profiling are specified on this tab, the first symbol of the Market Watch window on H1 timeframe is used by default.

MQL5.community

Trading platform and MetaEditor are tightly integrated with MQL5.community – a community of MQL5 developers. The MQL5.community provides unique services for traders and developers:

  • Market – you can purchase any ready-made application in the store of MQL4/MQL5 programs. Before purchasing, you can download a trial version and test it in the strategy tester.
  • MQL5 Cloud Network is a powerful distributed computing network available for testing and optimization of Expert Advisors in the Strategy Tester. Thousands of optimization sessions can now be performed in minutes. In addition to using the network, you can provide your own computing capacities and earn.
  • MQL5 Storage – personal storage of source codes integrated into the MetaEditor. Keep your code safe and access it from anywhere in the world. The MQL5 Storage features will be expanded soon to allow multiple users to remotely work on one project.
  • Freelance – if you cannot find the desired application in the Code Base or Market, order one from a professional developer in the Freelance section of MQL5.community website.
  • Code Basedownload any code published in the Code Base of MQL5.community website. The code is automatically placed in the correct directory and compiled.
  • Articles – various useful MQL5.community articles about MQL5 programming language and the platform have been published on the MQL5.community website. Find the necessary data by article headers and descriptions conveniently listed in a separate tab of the Toolbox window.

Configuring access to MQL5.community

Enter your account detail and get access to all the unique services of the MQL5.community:

  • Login – MQL5.community account.
  • Password – a password to the specified account.
  • The password is stored on the hard drive in an encrypted form.
  • Login and password are case sensitive. They should accurately match your login on MQL5.community website.
  • If you do not have an MQL5.community account, please register and get access to unique opportunities.