Recover mq5 file missing in compiling process

 

Hi..

I was in the process of compiling my mq5 file, say abc.mq5, and then suddenly my laptop automatically shut down due to a battery leakage before the compiling process finished. After rebooting the laptop, I found my mq5 file, abc.mq5, with no text (script) in it at all. Is there any way to recover this kind of file?

Thanks a lot.

 
bqFX :

Hi..

I was in the process of compiling my mq5 file, say abc.mq5, and then suddenly my laptop automatically shut down due to a battery leakage before the compiling process finished. After rebooting the laptop, I found my mq5 file, abc.mq5, with no text (script) in it at all. Is there any way to recover this kind of file?

Thanks a lot.

Always use Storage. Save your code - submit it to the Repository, and then mock the code. In which case you can always download your code from the Repository.

Working with Storage

Working with Storage - Projects and MQL5 Storage - MetaEditor Help
Working with Storage - Projects and MQL5 Storage - MetaEditor Help
  • www.metatrader5.com
The MQL5 Storage (or repository) only works with the MQL5 (or MQL4) folder of the trading platform, and with the special Shared Projects directory, which is used for group projects. All operations with the MQL5 Storage are performed via the context menu of the Navigator window and through the context menu of the source code editor: Getting...
 

I have no idea about how to recover this file ...

But just for the future - use the storage (from any computer, from any location, from any Metatrader).
Example: if you buy new PC so you can install Metatrader and download everything (which you need) to this Metatrader from your storage).

MT5 storage:

MT4 storage:

 
Vladimir Karputov:

Always use Storage. Save your code - submit it to the Repository, and then mock the code. In which case you can always download your code from the Repository.

Working with Storage

Many Thanks @Vladimir Karputov..
 
Sergey Golubev:

I have no idea about how to recover this file ...

But just for the future - use the storage (from any computer, from any location, from any Metatrader).
Example: if you buy new PC so you can install Metatrader and download everything (which you need) to this Metatrader from your storage).

MT5 storage:

MT4 storage:

Many thanks @Sergey Golubev..
 
bqFX :
Many Thanks @Vladimir Karputov..

The lost file, unfortunately, cannot be returned, but I hope that in the future you will start using the Storage and all your codes will be safe.

 

1) install farmanager

2) remember the unique text in your code

3) do search on entire volumes with farmanager (alt+f7)

 
I already lost the entire content of one of my .mqh file for unknown reason when compiling. Fortunately I saved the code 1 week ago in a Gitlab repository so I recovered 95% of the file source code and I was able to remember what was missing. But god, this kind of bug should not happen... 
Reason: