Can i use constants as global variables in mq5
-
Hi All,
is it possible to turn a constant into a global variable?
The reason is that I have an EA attached to a lot of charts.
Changing now an input manually in all instruments takes ages and can lead to human errors.
So my idea is to use a script which updates all in one go.
But the script can't directly use inputs/constants it needs global variables.If there is another route to achieve this I'm also happy to test this...
Thanks!
-
Try the terminal global variable as the shared input
You don't even need a script
-
@sktsec
Amazing!!
Thanks a lot for the tip, that's a game changer!I attached the terminal block to the "on Init" tab. I read somewhere that the files for terminal variables stay only for 30 days. You think I have to redeploy it every month?
-
"terminal variables stay only for 30 days" probably means after you closing the MT4/M5
-
Excellent! Thanks it works fine now. I even managed to change the global variables with a telegram message.