Why convert EX4 to MQ4?
When a developer compiles an MQL4 source file in MetaEditor, the result is an .ex4 bytecode file that runs in the MetaTrader 4 terminal; the source stays on the developer's machine or is discarded intentionally. Post-build-600 .ex4 files use a changed format with stronger obfuscation that no available decompiler can reliably reverse, making recovery of the original .mq4 effectively impossible.
How to convert EX4 to MQ4
MetaEditor FREE
If you want to recreate the strategy, open MetaEditor from MT4 (Tools > MetaQuotes Language Editor), write the logic in MQL4, and compile to a new .ex4 - the original source cannot be recovered from the compiled file.
About these formats
An EX4 file is a compiled MQL4 program for the MetaTrader 4 trading platform -- an Expert Advisor (trading robot), a custom indicator, or a script. You install it by copying it into the…
Open .EX4 details →A .MQ4 file is associated with MetaTrader custom indicator, a data file.
Open .MQ4 details →Quality & what to watch
- Since MetaTrader 4 build 600 (February 2014), 'EX4 decompiler' sites and tools produce unusable output on modern files at best and may distribute malware at worst.
- You do not need the
.mq4source to use an.ex4- copy it to the correct MT4 folder (MQL4/Experts,/Indicators, or/Scripts), restart the terminal, and attach it to a chart. - If you own the original program, contact the developer or seller to request the
.mq4source file, as many commercial EAs include source access as a purchase option.
Frequently asked questions
I found a free EX4 decompiler online - will it work?
.ex4 files.Can I see the input parameters of an EX4 without the source?
.ex4 to a chart in MT4; the Inputs tab shows all configurable parameters the developer exposed, though not the underlying logic.What if I compiled the EX4 myself and lost the MQ4?
.mq4 alongside the .ex4 in the MQL4 folder by default; if deleted, recovery is not possible through any converter.