Examples: Changing the External Parameters of MQL4 Programs without Restarting

 

New article Changing the External Parameters of MQL4 Programs without Restarting has been published:

The article describes a method of changing the external parameters of MQL4 programs on-the-fly, without restarting.

Everybody who had ever launched an EA or an indicator for execution, faced the possibility to preliminarily set up external parameters that often underlay the success of the program. There is a possibility to change parameters during the program operation. But how can that be done without initialization? In some cases, this may affect managing the previously opened orders. In this article, we try to solve this problem as flexibly as possible.

Author: Alexey Koshevoy

 
I think the better solution is to handle init/deinit properly
 

can't we do it much simpler? just create global vars for all parameters. you need them anyhow, to save the status during the period when you computer/network/etc is off, to restore/resume the trading and the analysis. then global vars can be easily edited directly from the terminal program, in case you stringently want to change the parameters of your expert, and a restart/reinit can not be carried on in that moment. On the other words, the idea is a bit odd... Your expert must be enough clever to handle interruption without losing its mind and tracks... i.e. without forgetting what he was doing and what orders he handled before interruption. That is because interruptions can occur in any moment, independent of you or your broker (market, net line, etc), and one EA forgetting old open orders or using strange variables after restart wont be so suitable to handle all your ecconomies.... The expert must be well written, and such an expert would probably handle any restart situation, and can be re-init in any moment. why we would need to change it's parameters without restart? It wouldn't be much simpler just to restart it?

 

Non standard workings add confusion to already confused environment ;)

Is not all 'knife n forking' done already? Live EA not item to be messed with when 'live'. If soooo desparate to fiddle with internals then edit+recompile Why? cuz EA bug. So fix it!

stitch + greg give very fair replys.

Reason: