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;
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.
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
Can this bug be addressed? Is there something I can do to work around this problem?