Over the weekend, many brokers carry out maintenance, so it could happen hat the connection goes down.
If there is a loss of connection or the account reconnects, then there is a possibility of the EA (and indicators) being restarted by the terminal.
You should program your EA to automatically recover, for example by saving important information or states in the Global Terminal Variables or in files.
For example, when I have a boolean flag to Keep track of something that was set to true on Friday and we go into the weekend with the variable still holding value "true" , when market opens on Monday next week, will it still be having the same state of true or it's possible the EA will have lost state when market closed for the weekend?
Secondly, when the EA is running, and then the terminal rescans the network and maybe changes to a different server does that make the EA lose state too ??
If you close it and reattach it yes it will close state.
If there is a disconnect and reconnect it won't go through init again (if ea is running)
Over the weekend, many brokers carry out maintenance, so it could happen hat the connection goes down.
If there is a loss of connection or the account reconnects, then there is a possibility of the EA (and indicators) being restarted by the terminal.
You should program your EA to automatically recover, for example by saving important information or states in the Global Terminal Variables or in files.
Isn't it only for indicators ?
Over the weekend, many brokers carry out maintenance, so it could happen hat the connection goes down.
If there is a loss of connection or the account reconnects, then there is a possibility of the EA (and indicators) being restarted by the terminal.
You should program your EA to automatically recover, for example by saving important information or states in the Global Terminal Variables or in files.
Thanks for insight on saving state. A good reminder about weekend maintenance for most brokers too. I had completely forgotten about it.
I'm not 100% sure, because if the connection goes down for long, it might think that it is a new account.
So, I would suggest that it is better to be safe than sorry and build the EA to self-recover, even if it does not happen.
The OP has not provide much information, so we can only speculate. For example, if this is a VPS, it might be rebooting during the weekend.
We have very little information about the conditions that could be the cause of the problem. So, one might as well build safe-guards into the EA to make it recover for all these cases.
I'm not 100% sure, because if the connection goes down for long, it might think that it is a new account.
So, I would suggest that it is better to be safe than sorry and build the EA to self-recover, even if it does not happen.
The OP has not provide much information, so we can only speculate. For example, if this is a VPS, it might be rebooting during the weekend.
We have very little information about the conditions that could be the cause of the problem. So, one might as well build safe-guards into the EA to make it recover for all these cases.
touche'
If you close it and reattach it yes it will close state.
If there is a disconnect and reconnect it won't go through init again (if ea is running)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For example, when I have a boolean flag to Keep track of something that was set to true on Friday and we go into the weekend with the variable still holding value "true" , when market opens on Monday next week, will it still be having the same state of true or it's possible the EA will have lost state when market closed for the weekend?
Secondly, when the EA is running, and then the terminal rescans the network and maybe changes to a different server does that make the EA lose state too ??