programming
Now you are reading
Mq4 and ex4 files - what are they and what are they for?
0

Mq4 and ex4 files - what are they and what are they for?

created Paweł Mosionek20 February 2015

Often people who start their adventure with MetaTrader 4 have a problem what to do with files with the extension mq4 or ex4. Files with such extensions can have different purposes and, depending on which, they must go to a different folder.

The popular MT4 gives almost unlimited possibilities of adjusting the trading interface to our needs. However, to equip it with non-standard tools such as scripts, automatic strategies whether indicators that are not installed by default with the program, should be placed in the appropriate place for the platform to read them correctly. Unfortunately, we need to know what kind of tool the given file is. You can also check it in its source code, as long as we have access to it and know how to recognize it.

MQ4 and EX4 - What they mean

Enlargement mq4 means that we have access to the source code of the file. Thanks to this, we can interfere with its construction by expanding or transforming it into MetaEditorwhere the programming language is MetaQuotes Language 4.

Files in ex4 it's already a compiled version, meaning it's a run-only file. We cannot edit its code.

Where to place MQ4 and EX4 files

Everything lands in the catalogs created by the platform. To get to them, run the platform, select on the top menu bar File -> Open Data Folder, thanks to which a new window will open.

mq4 ex4 metatrader window

After adding the tool to the MT4 folder, we need to complicate the file in MetaEditor or reset the platform (restart).

Compilation

The MetaEditor tool is available in the upper tab Menu -> Tools -> MQL language editor or under the abbreviation F4. After launching it, select a given file from the Navigator window, double-click on it, and then select File -> Compile (F7) from the menu.

metatrader compilation 4

indicators

Thanks to the ability to create and use custom indicators, we can analyze the financial instruments in any way or receive information about our account or position in a continuous manner on the chart.

Indicators should be placed in the catalog Terminal \ MQL4 \ Indicators.

The indicators added by us will be visible in the menu Insert -> Indicators -> Custom or in the window Navigator -> Indicators.

scripts

Scripts allow you to perform a single action or several tasks, where they are deleted after their completion. They are especially useful for the so-called scalping when you want to quickly e.g. open or close a position.

All files of this kind are placed in the catalog Terminal \ MQL4 \ Scripts.

Automatic strategies (Expert Advisors)

These are the tools that offer the most possibilities. The so-called. Expert Advisors are watching all the time, as long as we leave the platform on :-). They can conclude transactions based on any conditions, manage open positions or export data.

All automatic strategies should be located in the directory Terminal \ MQL4 \ Experts.

For many interesting and non-standard solutions, please visit the section Tools.

What do you think?
I like it
20%
Interesting
20%
Heh ...
0%
Shock!
20%
I do not like
0%
Detriment
40%
About the Author
Paweł Mosionek
An active trader on the Forex market since 2006. Editor of the Forex Nawigator portal and editor-in-chief and co-creator of the ForexClub.pl website. Speaker at the "Focus on Forex" conference at the Warsaw School of Economics, "NetVision" at the Gdańsk University of Technology and "Financial Intelligence" at the University of Gdańsk. Twice winner of "Junior Trader" - investment game for students organized by DM XTB. Addicted to travel, motorbikes and parachuting.