I was modifying a couple of EA's today, but after copying/pasting some lines of code I suddendly got a compilation error regarding the Event Handler not found, I confirmed all the code was correct and decided to restart the both MetaTrader 5 and MetaEditor applications.
After doing this it's not showing any lines of code for both of my EA's, I even checked the file itself and it's empty (0 KB).
I don't have a backup of those files so I technically lost both source code!!! I lost weeks of work.
I'm honestly dissapointed. What do I do at this point?
I was modifying a couple of EA's today, but after copying/pasting some lines of code I suddendly got a compilation error regarding the Event Handler not found, I confirmed all the code was correct and decided to restart the both MetaTrader 5 and MetaEditor applications.
After doing this it's not showing any lines of code for both of my EA's, I even checked the file itself and it's empty (0 KB).
I don't have a backup of those files so I technically lost both source code!!! I lost weeks of work.
I'm honestly dissapointed. What do I do at this point?
What was the error ?
Compilation error:
event handling function not found Advanced Turnaround Strategy.mq5 1 1
This is the same compilation error that I get at the moment, which is the same if I try to compile an empty file, only difference is that when I got this error the first time, both files were not empty.
Before restarting the MetaEditor I did save the changes from the application itself for both mq5 files.
Files and code were working without issues, they existed a couple of updates back from build 5200.
I do not have Git or AlgoForge connected into my MetaEditor.
I've checked the logs from Event Viewer (windows) and the MQL5 folder, but couldn't find anything actual errors.
Compilation error:
This is the same compilation error that I get at the moment, which is the same if I try to compile an empty file, only difference is that when I got this error the first time, both files were not empty.
Before restarting the MetaEditor I did save the changes from the application itself for both mq5 files.
Files and code were working without issues, they existed a couple of updates back from build 5200.
I do not have Git or AlgoForge connected into my MetaEditor.
I've checked the logs from Event Viewer (windows) and the MQL5 folder, but couldn't find anything actual errors.
Can you send the MetaEditor.log ? Or just check it yourself, maybe there are useful information.
Are you using Windows ? Are you using hardlink ? Do you have enough space on your hard drive ?
Up to now I don't have any issue with build 5200, but I didn't use it much yet, will see in the next days.
Can you send the MetaEditor.log ? Or just check it yourself, maybe there are useful information.
Are you using Windows ? Are you using hardlink ? Do you have enough space on your hard drive ?
Up to now I don't have any issue with build 5200, but I didn't use it much yet, will see in the next days.
I did check the logs myself, found nothing outstanding.
I also did open a new ticket with the Service Desk, and sent them all the detailed information, including the log file.
I'll update this post with what they reply.
I'm running Windows 10
Forum on trading, automated trading systems and testing trading strategies
"Event handling function not found". You could lose your code if you don't have a backup!
dc3463456, 2023.06.15 22:34
Warning to anyone. If you encounter the error "event handling function not found", it could be because your hard drive is full.
Even after freeing 10GB of space, I was still getting the same error when trying to compile my indicator.
So I restarted MetaEditor and now the source file is completely blank and the ex4 doesn't work.
I think this might be it, I got my SSD almost full after downloading a lot of Symbols bar history.
But it's wild that you'll lose your code even if you close your MetaEditor with the code in there.
I'll update my Service Desk ticket with that detail, thanks for bringing that out!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was modifying a couple of EA's today, but after copying/pasting some lines of code I suddendly got a compilation error regarding the Event Handler not found, I confirmed all the code was correct and decided to restart the both MetaTrader 5 and MetaEditor applications.
After doing this it's not showing any lines of code for both of my EA's, I even checked the file itself and it's empty (0 KB).
I don't have a backup of those files so I technically lost both source code!!! I lost weeks of work.
I'm honestly dissapointed. What do I do at this point?