Mq4 and ex4 files - what are they and what are they for?
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.
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.
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.