This article explains what an EX4 file is and how to open or convert it.
How do I import an Expert Advisor (EA) ex4 file into Meta Trader?
A file with the EX4 file extension is a MetaTrader 4 program file. It is compiled programming code created for the free currency trading program MetaTrader.
The programming code in the file is compiled from an MQ4 file (MQL4 source code file). This is done via a tool called MetaEditor that is installed with MetaTrader.
One of these files may store scripts or indicators used by that software. The file may instead be an Expert Advisor (EA) program used by MetaTrader to automate trading.