Table of Contents
After seven days, the problem was solved and fixed!
After I upgraded Windows 10 to Windows 11, I started to use Metatrader. I created an expert advisor EA, and after compiling it, I got an “ex4 write error”.
After that, I tried to compile many indicators and EAs, and all showed the same – ex4 write error.
When encountering a “write error” in MetaTrader’s ex4 files after upgrading to Windows 10 or Windows 11, two common issues could be the cause: first, an entire disk with insufficient space for writing new files, though in your specific case, this is unlikely as you have 10GB free; second, restrictive folder permissions that prevent file writing, but this also seems not to be the issue in your scenario. Therefore, the problem may lie elsewhere, such as compatibility issues or software settings, since the typical causes (disk space and permissions) are already addressed.
What this means :
1) Your disk is complete, and you can not write files. (in my case, I had 10GB free.)
2) Folder permission doesn’t allow writing. (in my case, everything is fine)
If you see that the MQL4 folder allows the system and administrator to write files, this is not a problem. You can check this if you press in Metatrader (mt4): File/Open File Folder, and then in MQL4 folder, you press Properties, then go to Security /Advanced and see write permissions.
3) Meta editor has a bug. (This is the problem in my case)
On November 12, Metatrader got a new version. In this version, the Meta editor has a problem writing compiled files. It will be fixed in the next few days, but you must fix the problem.
Solution :
Copy the metaeditor.exe file from the older version to the new version. This is all !!!
This is only the metaeditor.exe file, which you must copy into the installation folder.
The issue of experiencing a MetaTrader ex4 write error after upgrading to Windows 10 or 11 can be attributed to several factors. Here’s a detailed explanation in bullet points:
Windows Compatibility and User Permissions
- Compatibility Issues: Upgrading to a newer version of Windows can lead to compatibility issues with existing software, including MetaTrader.
- Solution: Running MetaTrader in compatibility mode for an earlier version of Windows can sometimes resolve this issue.
- Administrator Privileges: MetaTrader might require administrator privileges to function correctly after an OS upgrade.
- Solution: Right-click on the MetaTrader executable and select ‘Run as administrator.’
File System and Directory Access
- Restricted File Access: Newer versions of Windows have more stringent security protocols, potentially limiting access to specific directories where .ex4 files are stored or written.
- Solution: Ensure MetaTrader has the necessary permissions to access and modify files in its directory.
- Read-Only Files/Folders: Sometimes, system upgrades can inadvertently set folders or files to ‘read-only’ status.
- Solution: Check the properties of the MetaTrader folder and .ex4 files, ensuring they are not marked as read-only.
Antivirus and Firewall Interference
- Antivirus Software: Some programs might falsely flag .ex4 files as malicious after a Windows upgrade.
- Solution: Temporarily turn off the antivirus to test if it resolves the issue. If it does, add MetaTrader and its directories to the antivirus exceptions list.
- Firewall Settings: Windows firewall might block certain MetaTrader operations post-upgrade.
- Solution: Check the firewall settings and ensure MetaTrader is allowed through the firewall.
MetaTrader Specific Issues
- Corrupted Installation: The upgrade process might have corrupted the MetaTrader installation.
- Solution: Reinstall MetaTrader to ensure all its components are correctly installed.
- Outdated MetaTrader Version: The installed version of MetaTrader might not be fully compatible with the latest Windows OS.
- Solution: Update MetaTrader to the latest version.
System Files and Registry
- Corrupted System Files: The Windows upgrade process can sometimes lead to corrupted system files, affecting applications.
- Solution: Use system tools like
sfc /scannow
in the command prompt to repair system files.
- Solution: Use system tools like
- Registry Issues: Windows upgrades can cause changes in the registry that affect installed software.
- Solution: Use a registry cleaner or manually inspect the registry (advanced users only) to ensure correct MetaTrader-related entries.
Please check the new versions of mt4 and mt5 and check the article about mt4 vs. mt5.