Indelible variable
-
Hi.
in my panel, I want to have some statistical data,
such as drawdom, the max level of margin that the operation has taken me ... etc.
The problem that arises for me is that if I turn off the mt5, when I turn it back on, my variables are reset to 0, losing the statistical data of my operations.
Is there some way that these variables are fixed as if they were a constant. In other words, that the value of my variables are not volatile.
I have tried, with the block modify variables, modify the value of a constant.
but obviously it doesn't work.
the solution would be to create a file with the value of the variables that I want not to be deleted. and when loading the EA in the init tab, retrieve these values from the text file.
You can help me to do it.
Thank you -
@cesardefez AFAIK, that is not possible unless your platform connects an external source to recover those data. I'm not an expart at MT5, though. So maybe I'm wrong.
-
@l-andorrà I was hoping that in the same way that an ea can read a set, it could also read the value of a vriable from a text file.
thanks -
@cesardefez
Solved.
At least temporarily.
the only drawback is that it is only saved up to 4 weeks after the last modification of the variable.
What I have done is create a global variable, giving them the values that I need to keep.
I create other variables in the EA, to be able to retrieve the value of the global variable and be able to present it on the screen.

Gracias, @ l-andorrà
-
@cesardefez Please be very careful with the las 'terminal variables'. As you can read on its 'help' section, they are not designed to work as 'normal' variables. I'm not a programmer, so I cannot offer a technical reason for that. I recommend you to do some search on the forums and you'll find more information.