Lost MQ4 file how to recover

 

I am new to MQL, my metertrader app froze indefinitely for 2 days. I then decided I needed to reinstall, when taking my backup I accidentally took the ex4 file instead of the mql4 file. Is there anyway I can get my code back from the ex4 file. I've worked on this code for 3 weeks.  I noticed on the internet that there is seemingly a lot of theft surrounding the EAs, so I am able to prove that I wrote the EA.


Thank you in advance.

 

You can't decompile. 

Decompilation somehow worked on the past, years ago. But not anymore.


But let's consider that you could: What would be the result?

-> the decompilation would return a complex and hard to understand code, you would not have any of your code comments, any of your function names, variables.. nothing... It would be structured in C Language Syntax, but very very hard to understand your code logic. Compilers do otimizations, remove functions, change them to compile the executable. Decompilation process would create a lot of different functions, along with yours [which as I told would be hard to read].


Sorry for you, but better is to code it again. And use some day-by-day backup strategy. (All my codes I put copies everyday on iCloud and gDrive. Because what we have inside our laptops/computers are never protected.) 


I wish you good luck for the next 3 programming weeks.

PS: Already happened to me on the past, better was to code it all again, then I learned the lesson.


What I really suggest to recover your code, is turn-off your machine, take it HardDrive out, connect it to some File Recover/Format Recover software, and look for your source code. It is very high probability that you can recover it. But, the probability reduces the more you keep your hard-drive on use. So if this is an option, do it before it is too late.