Davide Abate: in order to debug I would like to periodically save the file gvariables.dat and read its contents to verify the behavior of the EA. Does anyone know how to read the file? if I open it with Notepad+ or other programs it's not readable..Thanks!
You can't edit it in a text editor. It's a binary file, not textual. It's format is not documented but with some effort it can probably be deciphered since it will most likely be an array of a structure consisting of a string, a double and a datetime, with an initial file header. It might have a few extras too.
@Davide Abate perhaps it's easier to dump from time to time all of the variable into readable file.
https://www.mql5.com/en/articles/1210 here are some examples.
https://www.mql5.com/en/articles/1210 here are some examples.

MQL5 Programming Basics: Global Variables of the Terminal
- www.mql5.com
This article highlights object-oriented capabilities of the MQL5 language for creating objects facilitating work with global variables of the terminal. As a practical example I consider a case when global variables are used as control points for implementation of program stages.

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
Hi,
in order to debug I would like to periodically save the file gvariables.dat and read its contents to verify the behavior of the EA.
Does anyone know how to read the file? if I open it with Notepad+ or other programs it's not readable..
Thanks!