Lost all positions after VPS restart?

To add comments, please log in or register
Chaya Suttichujit
194
Chaya Suttichujit  

Hi,


I'm running an EA on MQL5's VPS. The situation I faced a moment ago was that I have some ongoing trades closed off suddenly when I re-sync my EA's settings from my local terminal to the VPS.


Why does this happen and Anybody ever has the same issue?


Regards,

whroeder1
17927
whroeder1  
  1. They didn't "closed off suddenly," your EA must have closed them.

  2. EAs must be coded to recover. If the power fails, OS crashes, terminal or chart is accidentally closed, on the next tick, any static/global ticket variables will have been lost. You will have an open order but don't know it, so the EA will never try to close it, trail SL, etc. How are you going to recover? Use a OrderSelect loop to recover, or persistent storage (GV+flush or files) of ticket numbers required.
To add comments, please log in or register