I would like to to store values of certain variables to be able to reuse them in case of event of a reboot ...
The extern variables can be modified, but aparently they dont stay..
Thanks for your help
You can store it to the file https://docs.mql4.com/files
Good luck :)
You can also use global variables
Can you tell me what kind of file is easier to use for storind few variable numeric values for example. MQL4 file or CSV, or text file. How do you create a file from an EA.
Would you have an example of just create write new file and stroind 2 variables in it, and read it.
We can use any text file types, e.g CSV
Btw, you can find many examples there :)
One of them :
//--- open the file for writing the indicator values (if the file is absent, it will be created automatically)
PrintFormat("%s file is available for writing",InpFileName);
PrintFormat("File path: %s\\Files\\",TerminalInfoString(TERMINAL_DATA_PATH));
//--- first, write the number of signals
Thanks Victor very much,
This much nicer. So it means that the global variables are stored somewere, right ?