xr86yp295m Forex Leader: 06/18/09

MT4 tip – MQ4 vs EX4

June 18, 2009

What a quiet day… dead, even. Nothing moved. We’re still about the same as I posted yesterday. Total yawn.

So I thought I’d share a small MT4 tip for those of you who wouldn’t know this.

Indicators and Expert Advisors (along with scripts and other things) are programmed using the MQL language (Meta Quotes Language).

Before being compiled, a program will have the extension MQ4. Once compiled (and usable) it will have the extension EX4 (Executable).

Now, let’s say you download an indicator from somewhere and save it in your Experts/indicators folder.

If the file has an MQ4 extension, you will be able to see it in your list of custom indicators but if you try to place it on a chart, it won’t work. Why? Because you need to compile it first. You can do this 2 ways:

1. shut down MT4 and restart. The file will now be compiled as an EX4.
2. if you don’t want to shut down, simply go to Tools, select MetaQuotes Language Editor, then from the right menu, under indicators, locate your file (double-click it). The code will appear in the Editor window. Now, simply click on “compile” (top menu) and you’re done. The file will now be executable (this is also useful if you want to read the code or modify it).

If the file has an EX4 extension, this means it is not readable, nor modifiable (technically). It will show up as “grayed out” in your list of indicators. You can’t do anything in MT4 to get it to work except shut down MT4 and restart. After you do this, the file will be active.

Hope this helps in clearing up some MT4 intricacies.

Now let’s hope tomorrow brings some a c t I o n !