In contrast, mq4 files contain the original source code and can be modified by traders and developers. EX4 files are compiled files that cannot be modified and contain the source code of an expert advisor that has been transformed into machine code for faster execution.EX4 and mq4 are file extensions used in MetaTrader, a popular platform for forex trading and technical analysis using automated trading robots called expert advisors.