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!
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
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?