How to Edit and Compile MQ4 File

Download any desirable Strategy in MQ4 format from our website (StrategyName.mq4).

Open the MT4 Terminal and log into your account. If you do not have the demo account and MT4 terminal installed yet, you can proceed simply by creating a new account at one of my Trusted Brokers.

Place the StrategyName.mq4 file into the Experts folder located in the Data Folder of MT4 Terminal. Below you can see how you can get into the Experts folder:

File -> Open Data Folder -> MQL4 -> Experts

Place the downloaded StrategyName.mq4 file into the MQL4/Experts folder.

Open the MetaEditor by clicking on the sign or by using the F4 shortcut in your MT4 Terminal. You will see the whole MQL4 filesystem and be able to open the source code by unfolding the Experts directory and clicking on the StrategyName.mq4.

MetaEditor

You can then make any desired changes to the existing code or keep it as it is. To compile the code, press the Compile button or press F7 (shortcut). If no bugs are present, your code will be compiled, and StrategyName.ex4 will be created in the same folder as the source code is located.

Successfully compiled code vs. code with bugs

Now you can run the EX4 strategy or edit the code further. Whenever you compile the code, the EX4 file is updated with the most recent version.

Still, have no trading account yet? Open an account at one of my trusted brokers suitable for algorithmic trading completely for free and start testing today!

This post contains affiliate links. If you use these links to register at one of the trusted brokers, I may earn a commission. This helps me to create more free content for you. Thanks!