Three checks to verify that EA is actually running after VPS restart
I am Yohaku, creating MT4/MT5 indicators and handy tools. What I make is decided from Gogojan reviews and questions, and the complaints that come up in the voices on X.
Reasons why people who keep EA running all the time move from their home PC to a VPS include PC freezes, line drops, and family members accidentally turning off the power. However, even on a VPS, short downtimes or restarts are unavoidable. On X, there are voices saying that what matters is whether you can confirm that you return to the original state after a restart, more than whether it’s a VPS or not. This time, I will summarize how to verify that.
First, the conclusion
- From VPS operation monitoring and notices like “restarted,” you can mostly tell whether the server is running. Whether the EA is running inside MT is something you should verify separately.
- After a restart, there are three things to check: charts and EA/indicators, permissions for auto trading and DLLs, and positions and pending orders.
- Because the latter cannot be seen from outside the server, you should leave the previous state before the restart for comparison. If you have configured MT to start automatically after a restart, you still need to confirm that its content returns to the original state after startup. Also, Windows may not automatically start MT if you are at the sign-in screen, so be careful of that.
What can be understood and not understood from VPS operation monitoring
VPS providers have mechanisms to alert you when the server stops or restarts and services that monitor uptime. The content of the alerts differs by provider, so please check with your provider’s guidance.
- What can be seen: whether the server is running, whether it responds, whether a restart occurred
- What is hard to understand: whether MT started, whether the account connected, whether the EA remained attached to the chart, whether auto trading is on, whether positions and orders are the same as before
The latter is the state inside MT, which cannot be seen from outside the server. Even if you have set MT to start automatically after a restart, it does not confirm that the contents are the same as before. Also, Windows may not start MT automatically if you are stuck at the sign-in screen, so be mindful of that.
Check 1: Are the charts and EA/indicators the same as before
- Check whether the number of open charts, the instruments, and the timeframes are the same as before.
- On the chart where an EA was attached, check whether the EA’s name appears (usually in the top-right of the chart; how it is displayed may vary by version). If it’s not there, it has been detached.
- For indicators, you can see them in the list of active indicators in the chart by right-clicking the chart and selecting the indicators shown there.
- In the Toolbox (in MT4, the Terminal), check the “Experts” tab to see if there is any reason listed why the EA detached.
A note: be careful when MT5 starts up before it has an internet connection. When I tried starting MT5 on Mac (build 6246) from an offline state, the EA began initialization about 6 seconds after loading, without waiting for login. For EA that require authentication (such as Gogojan’s Web authentication), if this fails at initialization, it will detach and won’t reattach until you re-add it. In the same test, MT4 waited for login before initializing.
Check 2: Permission for auto trading and DLLs
- MT5 shows “Automated trading” on the toolbar, MT4 shows “Auto trading” on. If it’s off, even if the EA is attached to the chart, it cannot place orders.
- Also check “Tools” → “Options” → “Expert Advisors” tab and whether “Allow DLL imports” is enabled. Tools with web authentication won’t work if this is disabled.
- Each EA has its own settings screen where you can enable auto trading and allow DLLs (the location and item names vary slightly by version).
Check 3: Are positions and pending orders the same as before
- In the Toolbox (MT4’s Terminal) under the “Trade” tab, match positions and pending orders against the previous records by ticket numbers.
- During the downtime, anything that was stopped by stop loss or take profit, or trades made by other EAs or manually on a phone, will appear as differences here.
- If the quotes’ prices are not moving, it may indicate you are not connected to the server. Review again after connection is established.