Download MetaTrader 5

MT4, MT5 - EA restarting everything after terminal restart instead of resuming the work

To add comments, please log in or register
The Market has more than 400 indicators. Try any of them!
Grzegorz Korycki
52282
Grzegorz Korycki 2014.02.24 20:42 

every time my computer hangs strategies instead of resuming open positions just start all over again.
Is it possible to make them resume work or to program EA in such way so it would resume the activity instead of reseting it every single time.
This is most annoying thing for me in both metatrader... unbelievable that even restart (not hanging) does not keep the EA work.

I quit providing the signals for now i think as it works like c**p, without some dedicated linux computer that doesnt hang or turn off for 2 years.

Is there any way to program an EA to avoid issues with terminal restart?

Uwe Goetzke
1444
Uwe Goetzke 2014.02.25 16:22  

Save the used parameters and the internal state to a file on OnDeinit. The name of the file could be one parameter.

OnInit check for existance of such a file and load its content into the internal state if the parameters are identical.

I assume that you check for an open position in a symbol independent of your internal state.

So you could in addition handle manual closing and opening of postions.

Benjamin Dixon
23166
Benjamin Dixon 2014.02.26 03:14  
ugo58:

Save the used parameters and the internal state to a file on OnDeinit. The name of the file could be one parameter.

OnInit check for existance of such a file and load its content into the internal state if the parameters are identical.

I assume that you check for an open position in a symbol independent of your internal state.

So you could in addition handle manual closing and opening of postions.

Ya or even save used parameters and internal state on each bar or trade or even tick and you'll be protected against "hangs" as well.
To add comments, please log in or register