Advertisement IC Markets

The forced restart nobody scheduled

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

The forced restart nobody scheduled

Post by Fairman »

The forced restart nobody scheduled

Operating systems update themselves. A computer can reboot at the worst possible time, closing the trading platform and any scripts running on it, with positions open.

On Windows, automatic updates sometimes install overnight or during the weekend and restart the machine when the user is away. A VPS can reboot for maintenance without much warning.

The result is a platform that is simply not running when it should be. Expert advisors stop, trailing stops stop, and anything depending on the terminal being open is left hanging.

Setting active hours so updates cannot restart the system during trading time is a basic step. Better is a startup routine that launches the platform and loads the right chart templates automatically after a reboot, and a notification when the machine restarts.

A habit of checking that everything is running at the start of each session catches problems before they matter.

On a VPS, the provider's maintenance window is worth asking about. Knowing when the machine may restart makes it possible to schedule around it.

Has an unplanned restart ever interrupted a live strategy?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: The forced restart nobody scheduled

Post by PTScalper »

Fairman wrote: Sat Oct 31, 2026 10:13 pm The forced restart nobody scheduled

Operating systems update themselves. A computer can reboot at the worst possible time, closing the trading platform and any scripts running on it, with positions open.

On Windows, automatic updates sometimes install overnight or during the weekend and restart the machine when the user is away. A VPS can reboot for maintenance without much warning.

The result is a platform that is simply not running when it should be. Expert advisors stop, trailing stops stop, and anything depending on the terminal being open is left hanging.

Setting active hours so updates cannot restart the system during trading time is a basic step. Better is a startup routine that launches the platform and loads the right chart templates automatically after a reboot, and a notification when the machine restarts.

A habit of checking that everything is running at the start of each session catches problems before they matter.

On a VPS, the provider's maintenance window is worth asking about. Knowing when the machine may restart makes it possible to schedule around it.

Has an unplanned restart ever interrupted a live strategy?
Hi Fairman,

fair point from my point of view.

Dealing with unexpected reboots while running live trading strategies is one of the most stressful hazards in algorithmic and automated trading. Because you specifically use cloud instances with Enterprise Windows to maintain strict control over your environment, you have access to advanced group policies and task scheduler tools that standard Windows editions lack.

An unplanned restart interrupting an active session—especially with open positions, unmanaged trailing stops, or disconnected execution scripts—can turn a profitable setup into a major drawdown instantly.

Thats why i prefer cloud instances with enterprise windows server, you can prevent such situations.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: The forced restart nobody scheduled

Post by PTScalper »

Here are some tricks how to do it :-)

Hardening Enterprise Windows Against Forced Reboots

To fully leverage your Enterprise Windows cloud instance and lock down update behavior, you can implement a robust, automated defense-in-quartile workflow.

1.Disable Automatic Restart
with Active Hours & Group Policy:

Enterprise Windows only - prevents unexpected reboots.

Open the Local Group Policy Editor (gpedit.msc) and navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Update.Enable "No auto-restart with logged on users for scheduled automatic updates installations".

Configure "Specify deadlines for automatic updates and updates" to extend grace periods.Verification: Run gpresult /h C:\gp-report.html in an elevated command prompt and check that the update restart policies show as Enabled.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: The forced restart nobody scheduled

Post by PTScalper »

2.Configure Task Scheduler for Automatic Platform Startup:

Ensures your trading terminal boots immediately after any reboot.

Set your trading platform executable to launch automatically upon system startup. Open Task Scheduler, create a new Basic Task triggered "At startup", and point the action to your terminal's .exe file (e.g., MetaTrader, cTrader, or custom Python script runners).

Set the "Start in" directory to the folder containing your terminal executable so chart templates and profiles load correctly.

Verification: Restart the cloud instance manually and verify that the trading terminal launches and successfully re-establishes broker connection within 2 minutes without manual login.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: The forced restart nobody scheduled

Post by PTScalper »

3.Implement Automated Startup Chart and Template Recovery:

Ensures indicators, Expert Advisors (EAs), and profiles load instantly.

Save your exact workspace configuration as the default startup profile in your terminal settings. For MetaTrader, save your workspace under Profiles/default, and ensure AutoTrading is checked by default in platform settings.

Verification: Check the terminal's "Experts" and "Journal" tabs immediately after startup to confirm that all Expert Advisors initialized successfully and are actively streaming quotes.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 7643
Joined: Mon Jul 20, 2026 1:28 pm

Re: The forced restart nobody scheduled

Post by PTScalper »

4.Set Up Instant Telegram or Webhook Reboot Notifications:

Catches downtime before it impacts open risk.

Write a lightweight startup script (PowerShell or Python) executed via Task Scheduler that sends a webhook message (e.g., via Telegram Bot API or Discord webhook) stating: "Cloud trading instance restarted at [Timestamp].

Terminal status: Online."

Verification: Check your messaging app after a test reboot to ensure the alert arrives successfully within seconds of the OS reaching the desktop.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: The forced restart nobody scheduled

Post by Fairman »

Server editions do help, mainly because you can pin the update policy and stop the "restart in 15 minutes" surprise. Still, I wouldn't lean on that alone. A host can reboot for reasons you don't control, like a hypervisor patch, a power event at the provider, or the machine just hanging. So I treat a restart as something that will happen eventually and make the recovery automatic.

My setup is simple. The terminal sits in the startup folder with the profile and templates saved, so after a boot it opens by itself and reattaches the EAs. Every open trade carries a server-side stop, never a stop that only lives in the EA, so a dead terminal can't leave a position naked. Then I get a ping from a small heartbeat script if the terminal hasn't reported in for five minutes.

Say you run three EAs at 0.3 lots with 15 pip stops. A 20 minute outage with no stop on the broker side could cost far more than 3 times 4.5 dollars per pip. Do you test your recovery by actually rebooting the VPS on a quiet Sunday?
It’s Fairman :geek:
Post Reply