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
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.
This is not correct. Global variables remain for 4 weeks from last time of access
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.
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 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?
You can always use the flush command to force a disk write
Paul Anscombe #:
If you only just created it before the crash then it could happen
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
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
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
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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register