This is the one in a series of Metatrader 101 posts, partly so that I can have something to give to clients who are new to Mt4. It will cover the basics so people can get up and running quickly.
One of the great things about Metatrader is the amazing range of free code out there for extending and customising your charts with no end of scripts, indicators and EA out there, many of them free. But one of the first things that you need to learn is how to install these third-party pieces of code within your set-up. Here’s how to do it.
1. When installing code it will either be a .mq4 file which is the source code, or an .ex4 file which is the compiled code – with just the latter you won’t be able to see the underlying code. If people supply both all you need is the .mq4 file as your software will automatically compile it. Sometimes there are additional support files such as DLL libraries which you’ll need as well.
2. Unfortunately, the location on your hard drive of your Mt4 software is rather complicated as it’s split up into two locations. The bit where you need to copy your new software to is hidden away deep within the AppData section and you won’t easily find it by exploring the various folders. To help you with this there is a menu option which will open the location for you. From your Mt4 software go to File | Open Data Folder in order to bring up Windows Explorer opened at the correct folder location.
|The folders within the MQL4 main folder
3. You’ll see an MQL4 folder which you should open to reveal a series of sub-folders (see image above). Now what you do next depends on what you’re installing. If it’s an EA then it needs to go in the Experts folder, a script goes in the Scripts folder and indicators go (you guessed it) in the Indicators folder. Sometimes if the code is complicated you might also need to install various support files such as Dll’s etc which will go in the Libraries folder.
4. That’s basically it but now you need to get your Mt4 program to recognise the new files. There are two ways of doing this. The easiest way is simply to shut down and re-start the Mt4 platform. You should then see the new code in the appropriate section of the Navigator. The other way of doing it is to refresh the appropriate Navigator pane. For example, if you’ve installed a new EA then you need to go to the EA section on the Navigator pane, right-click and select Refresh. This will re-scan for all available EA code and your new EA should now be listed.
|The various sections of the Navigator pane – right-click and select Refresh
That’s it! You can now make use of all the amazing pieces of Mt4 code that are out there.