What Is an MQ4 File?

How to Open and Convert MQ4 Files

Screenshot of several MQ4 files in Windows 10 that open with MetaTrader 4
MQ4 Files.

A file with the MQ4 file extension is an MQL4 Source Code file. MQ4 files can contain variables and functions, as well as comments, related to the MetaQuotes Language 4 programming language.

You can read a lot more on this format, and MQ4 files, at MQL4.com.

Note: Although they look similar, MQ4 files are not at all related to MP4 video files.

How to Open an MQ4 File

MQ4 files can be opened with MetaQuotes  MetaTrader platform.

However, because MQ4 files are associated with version 4 of the MetaTrader program (MT4), you probably can't use one in newer versions, such as MetaTrader 5.

Instead, you need to install the older version in order to open the MQ4 file. You can download MT4 from FXCM.

MetaTrader 4 is also available here for iOS devices and on Google Play for Android devices.

You can also open an MQ4 file with Notepad or any other text editor. Doing this lets you see the source code information but it isn't the best method of viewing an MQ4 file since the MetaTrader program is built specifically for using this file and displaying its information properly.

Tip: If you find that an application on your PC does try to open the MQ4 file but it's the wrong application or if you would rather have another installed program open MQ4 files, see our How to Change the Default Program for a Specific File Extension guide for making that change in Windows.

How to Convert an MQ4 File

If you need to convert MQ4 to MQ5 so that the file will open in a newer version of MetaTrader, you can use this free online MQL converter. Just upload the MQ4 file there to do the conversion - you don't need to download any software since it converts the file online.

MetaTrader 4 converts MQ4 files to EX4 automatically when you import the file into the Indicators folder.

If you have MetaTrader open when the file is copied into that folder, close and reopen the program to generate the EX4 file.

You can convert MQ4 to C# with the online MQ4 to cAlgo Converter. To do this, open the MQ4 file with a text editor like one from the list we linked to above, and then hit the convert button on that conversion website to produce the C# result.

Need More Help?

See Get More Help for information about contacting me on social networks or via email, posting on tech support forums, and more. Let me know what kinds of problems you're having with opening or using the MQ4 file and I'll see what I can do to help.

Was this page helpful?