My code has all of a sudden disappeared

 

I have 4 mql4 files that are under the file name "expert advisor", two of them are MACD & Moving average sample codes, the other two are project files that I've been working on, for simplicity lets call one file A and one file B. 

Whilst working on file A, I just made small changes to the code and pressed the compile button. It said event handling function not found, so I didn't know what it meant.. assuming it was just a bug or an internet connection I closed meta editor to only re open meta editor again and the code has completely been wiped ! 

Has any one ever had a similar experience before ? And what could the case be ? 

 
Adj007:

I have 4 mql4 files that are under the file name "expert advisor", two of them are MACD & Moving average sample codes, the other two are project files that I've been working on, for simplicity lets call one file A and one file B. 

Whilst working on file A, I just made small changes to the code and pressed the compile button. It said event handling function not found, so I didn't know what it meant.. assuming it was just a bug or an internet connection I closed meta editor to only re open meta editor again and the code has completely been wiped ! 

Has any one ever had a similar experience before ? And what could the case be ? 

Yes, it happened to me twice at very different times.

In both cases, the affected files were those that I had open in MetaEditor at the time, and their content had been completely wiped (filled with null characters).

I suspect that in both cases there was memory or file corruption caused by a malfunctioning MetaEditor.

However, it did not affect me much as I keep regular backups and simply restored the files after first restarting my computer.

 
Fernando Carreiro #:
Yes, it happened to me twice at very different times.

Has this happened to projects or could it also be non-project files?

 
Vladislav Boyko #: Has this happened to projects or could it also be non-project files?

I don't use project files, so in my case it was non-project files.

 
Fernando Carreiro #:

I don't use project files, so in my case it was non-project files.

This is very bad news for me. I always have several files open and losing them would be catastrophic.

Fernando Carreiro #:
However, it did not affect me much as I keep regular backups

Is committing to MQL storage a good backup? How do you think? I'm talking about adding the file I'm working with to storage, not a copy of it. That is, this is a commit of a single instance of the file.

[EDIT]

Logically, if a local copy of a file is wiped, this should not affect the copy located on the server.

But I can't be sure about it😄

I have read the topics about projects disappearing from storage. But they were talking about projects, not individual files

 
Vladislav Boyko #:

Is committing to MQL storage a good backup? How do you think? I'm talking about adding the file I'm working with to storage, not a copy of it. That is, this is a commit of a single instance of the file.

I have found it to be good, but in addition I copy all source code regularly to 2 different clouds 

 
Vladislav Boyko #:

This is very bad news for me. I always have several files open and losing them would be catastrophic.

Is committing to MQL storage a good backup? How do you think? I'm talking about adding the file I'm working with to storage, not a copy of it. That is, this is a commit of a single instance of the file.

[EDIT]

Logically, if a local copy of a file is wiped, this should not affect the copy located on the server.

But I can't be sure about it😄

I have read the topics about projects disappearing from storage. But they were talking about projects, not individual files

Yes MQL Storage is working fine for backup purpose.

I never had the issue discussed on the topic. And I probably worked thousands of hours with mql4 ME. Though I am now, since several years, developing only with mql5 ME, then doing the minimum needed under MT4/mql4.

 
Vladislav Boyko #:

This is very bad news for me. I always have several files open and losing them would be catastrophic.

Is committing to MQL storage a good backup? How do you think? I'm talking about adding the file I'm working with to storage, not a copy of it. That is, this is a commit of a single instance of the file.

[EDIT]

Logically, if a local copy of a file is wiped, this should not affect the copy located on the server.

But I can't be sure about it😄

I have read the topics about projects disappearing from storage. But they were talking about projects, not individual files

Don't be so melodramatic. It only happened twice in a 12 year span.

Just keep your backups up to date, and use a cloud storage too (I use OneDrive as its part of the Microsoft Office license).

 
R4tna C #:
Alain Verleyen #:
Fernando Carreiro #:

Thanks a lot!


Adj007:

I remembered one similar topic. Read this:

https://www.mql5.com/en/forum/449083

(and make sure your drive is not full)

 
thank you guys for your help !