Global Variables reset on MT4 crash

 
If MetaTrader is forcibly shutdown due to a lockup, or the PC crashes, etc (anything but a graceful close), many times the global variables are reset to zero or otherwise wiped out.

Can this bug be addressed? Is there something I can do to work around this problem?
 
Have your EA write your variables to a file and then if for any reason your computer crashes or restarts. Your EA can load the values from your file.
 
Have you experienced this as well? Want to make sure I'm not doing something else wrong.
 
As far as MT4 being stable I only have experienced it crash/lockup a couple of times and in those instances the cause was not the platform but a coding error in an EA that I was developing.

As far as variables, most of the EAs that I have written do not need variables saved for a long period of time except one EA. There is one EA that I am writing that requires its value to be saved to a file so it will be available even after computer restarts or crashes. Otherwise, external global variables are saved by MT4 but, these variables can be manipulated by the user or the program. For example the following variables will hold their value even after you restart MT4 or your computer.

extern int Lots, StopLoss, TakeProfit, Slippage;



Have you experienced this as well? Want to make sure I'm not doing something else wrong.
Reason: