I have an EA running on more than a dozen pairs. Every time I edit the code, I have to manually switch to each chart and manually reload the EA because the new code won't go into effect automatically. A real pain.That also applies to templates. Even if I reload a template after the code has been changed, the template stores the old version of the EA. So I have to reload the EA and save the template again so it is updated properly, then I have to manually reload the template in each chart individually. Extra pain.
Is there some way around that, either programatically or some other way?
I assume that you are not changing the name of the EA.
You can try adding a new fake input before compiling. Ie. an input variable that is not actually used in the code. Don't forget to remove it later.
So you're saying that merely introducing an input variable will force the EA to be reloaded on all charts?
And why do I have to remove it later?
Why don't you try it and see.
You don't have to remove it, but do you really want inputs that don't do anything?
I tried it, and it doesn't make any difference. I still have to reload the EA on every chart individually.
I know that this seems a dumb question, but when you are editing and compiling, you are keeping the EA name the same are you?
Yes. I just save it and press F7 to recompile.
I don't know why you need to save it before compiling as it gets saved when it is compiled. But that shouldn't make any difference.
Whenever I re-compile, if the EA is on a chart it will automatically re-initialize so I don't know why yours do not.
The only thing is if you change the default input values in the code, they will not be updated. That is why I suggested the trick of adding a fake input, then the input values are updated.
Do you use software to clean your system periodically. I do find that I need to do that when MT gets clunky.
The other thing that you can try is to change profiles. This should unload all the EAs. Change back to the original profile and the EAs should all be re-loaded and re-initialized.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.