Global variable missing

 
Hello! I have saved a GlobalVariable() on Friday, and today I had a computer crash, and after I have restarted and checked, global variable is missing . Should that happen? 
 
Yes, this can happen because GlobalVariable() in MQL5 is stored in memory and not persisted across restarts unless explicitly saved. If your computer crashes or restarts, the global variable stored using GlobalVariable() will be lost unless you save it to a file or database before the crash occurs.
 
Simon Draxler #:
Yes, this can happen because GlobalVariable() in MQL5 is stored in memory and not persisted across restarts unless explicitly saved. If your computer crashes or restarts, the global variable stored using GlobalVariable() will be lost unless you save it to a file or database before the crash occurs.
Are you sure? Because I have just saved another GV and unplugged the computer( to simulate the same crash) . After restart GV was there 
 
Simon Draxler #:
Yes, this can happen because GlobalVariable() in MQL5 is stored in memory and not persisted across restarts unless explicitly saved. If your computer crashes or restarts, the global variable stored using GlobalVariable() will be lost unless you save it to a file or database before the crash occurs.
This is not correct.  Global variables remain for 4 weeks from last time of access
 
Paul Anscombe #:
This is not correct.  Global variables remain for 14 days from last time of access
Thanks! So how come they disappeared ? 
 
Daniel Cioca:
Hello! I have saved a GlobalVariable() on Friday, and today I had a computer crash, and after I have restarted and checked, global variable is missing . Should that happen? 
If you only just created it before the crash then it could happen 
You can always use the flush command to force a disk write

https://www.mql5.com/en/docs/globals
 
Paul Anscombe #:
If you only just created it before the crash then it could happen 
You can always use the flush command to force a disk write

I am creating the variables on Friday . I use this to close the trades on Friday to avoid swap. And on Monday I am opening the trades again based on the information taken from the global variable . And the crash happend on Sunday afternoon 
 
Daniel Cioca #:
I am creating the variables on Friday . I use this to close the trades on Friday to avoid swap. And on Monday I am opening the trades again based on the information taken from the global variable . And the crash happend on Sunday afternoon 

well it would have flushed to disk in that time, so it will probably remain a mystery and in some way related to the crash of your pc

 
Paul Anscombe #:

well it would have flushed to disk in that time, so it will probably remain a mystery and in some way related to the crash of your pc

Ok! Thanks! How about this flush command? Kindly give me somewhere to read about . I have only found FileFlush()  but this is for files not for GV 
 
Daniel Cioca #:
Ok! Thanks! How about this flush command? Kindly give me somewhere to read about . I have only found FileFlush()  but this is for files not for GV 

I already provided a link for you above...