Maintain value for drawdown after changing input
rwh0965: I have this code, which I'm must trying to show the daily drawdown. It generally works, but if the user goes in to change an input value, it resets the drawdown value. How can I get it to maintain the drawdown value?
To maintain any persistent variables that need to survive an indicator or EA restart, save them to Global Terminal Variables or save (and restore) the data to (from) a file.
Documentation on MQL5: Global Variables of the Terminal
- www.mql5.com
Global Variables of the Terminal - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Fernando Carreiro #:
To maintain any persistent variables that need to survive an indicator or EA restart, save them to Global Terminal Variables or save (and restore) the data to (from) a file.
To maintain any persistent variables that need to survive an indicator or EA restart, save them to Global Terminal Variables or save (and restore) the data to (from) a file.
That's exactly what I needed.
Thanks!
I have this code, which I'm must trying to show the daily drawdown. It generally works, but if the user goes in to change an input value, it resets the drawdown value.
How can I get it to maintain the drawdown value?