Skip to content
MT5MT4soonTradingViewsooncTradersoonNinjaTradersoonPythonsoon
Expert Advisors & automation

VPS

Also called Virtual private server, Trading VPS, Forex VPS, VPS hosting, VPS server

A VPS (virtual private server) is a rented computer in a data centre that stays on around the clock. Traders use it to keep a trading platform and its Expert Advisors running and connected to the broker while their own PC is off.

A VPS does not make a strategy better. It removes two ways an automated trade goes wrong: the computer running it stops, or its orders reach the broker slowly.

What a VPS does for an automated strategy

An Expert Advisor (EA) is a program that opens, manages and closes trades for you. It only works while your trading platform is open and online. Close the laptop, lose power or lose internet, and the EA stops.

The VPS takes over that one job. You install your platform on it, attach the EA, and disconnect. The platform keeps running there, and you check in from a PC or phone through a remote desktop app.

What you rent is usually a Windows desktop you log in to remotely. Your platform login is stored on it, so use a strong password for the VPS. It is billed monthly whether you trade or not.

The second benefit is latency: the time an order takes to travel from your platform to the broker's server, shown as ping in milliseconds. A VPS in a data centre near the broker's server has a shorter, steadier route than home internet. In a fast market, price can move while an order travels, so you can get a fill at a different price from the one you asked for. That difference is called slippage, and a shorter route means less chance of it. A VPS shortens only the travel time, not the broker's own execution time or the spread.

The diagram below shows the two routes an order can take.

Order route from a home PC versus a VPS to the broker's trade server
The EA runs wherever the platform runs. A VPS is built to stay on when your PC is not.

What a two-hour outage costs on one trade

The figures here are an illustrative example. You buy 0.50 lots of EUR/USD with a stop loss 40 pips below entry. Your EA trails the stop 20 pips behind price.

Your internet drops just after entry and stays down for two hours. In that time price rises 50 pips, then reverses and falls through your entry, all before the connection comes back. A working EA would have moved the stop to 30 pips above entry as price rose.

  • Platform online: the trailed stop closes the trade at +30 pips.
  • Internet down until after the reversal: the stop never moved, so the trade closes at the original stop, -40 pips.

The chart below shows the same illustrative trade.

Illustrative outage trade: the internet stays down through the rise and the reversal, so the original stop at -40 is hitIllustration
Entry, 1.10001.1000Trailed stop at +30 pips that wa1.1030Original stop, -40 pips1.0960Internet downTrailed stop would have closOriginal stop hit at -40
Illustrative example. The connection is down for every candle shown, so the EA never moves the stop. The distance between the +30 line and the -40 line is the $350 gap worked out below.
Cost of a two-hour outage on a 0.50 lot EUR/USD trade
Value of 1 pip0.50 × $10= $5
Profit the trailed stop would have locked30 × $5= $150
Loss at the original stop40 × $5= $200
Gap between the two outcomes$150 + $200= $350
Cost of the outage$350

Now compare that with the rent. Say the VPS in this example rents for $20 a month. That is $20 × 12 = $240 a year, less than this one outage. But the outage only costs you this much if it coincides with an open trade that then reverses; it can also cost nothing, or cost more if the EA misses a new entry. Redo the sum with your own lot size, stop distance and VPS price.

Which orders keep working if your platform goes offline

A common misread is that nothing is protected without a VPS. Some orders are stored at the broker and some exist only inside your platform. On most retail platforms the split looks like this, but confirm it for yours, especially the trailing stop.

Order or featureWhere it usually livesPlatform offline
Stop loss and take profit attached to a tradeBroker's serverStill triggers
Pending limit and stop ordersBroker's serverStill triggers
Trailing stopYour platformStops moving
EA entries, exits and trade managementYour platformStops
Price alertsYour platformStops

If anything you rely on is in the bottom three rows, it only works while the platform is online.

Checks before you rent a VPS

  • Decide if you need one. If you trade by hand and every trade has a fixed stop loss at the broker, you can skip it. If an EA manages open trades, or you run trailing stops overnight, rent one; a home PC left on can do the same job, but a VPS removes home power cuts and internet drops.
  • Choose between built-in hosting and your own VPS. Some platforms and brokers rent hosting from inside the platform. Otherwise you rent a VPS yourself and install the platform on it as you would on any computer. Built-in hosting usually gives you no remote desktop, only the migrated platform.
  • Pick the location by your broker's server. Ask the broker which city their trade server is in and choose a data centre close to it.
  • Match the need to your style. If your targets are a few pips, low ping matters as much as uptime. If you hold for hours and aim for tens of pips, uptime is what you are paying for.
  • Keep the fixed stop loss. A VPS can fail too.

How to set up a VPS for your EA, step by step

If you rent your own VPS rather than built-in hosting, work in this order:

  1. Rent the VPS in the location you chose.
  2. Connect to it from your PC with a remote desktop app, using the login the VPS provider gives you.
  3. Install your trading platform on the VPS and log in to your trading account.
  4. Copy the EA and its settings from your home platform and attach it to the same charts.
  5. Turn on automated trading and set the platform to start when the VPS boots.
  6. Turn off the EA at home. The same EA on the same account on both your PC and the VPS can double every order.
  7. Test on a demo account for a week. Check the platform log for disconnects, and check that every signal the EA logged became an order.

Where you check connection and ping on your platform

Most trading platforms show a connection indicator, usually in a corner of the main window, with the current ping to the broker's server. Read that number on the VPS itself, not on your home PC. The link that counts is VPS to broker, not you to VPS.

The platform's log records every disconnect and reconnect with a time stamp. Scan it once a week. Gaps during your trading hours mean the VPS or its network is not doing its job.

Reading the platform log: a disconnect gap inside trading hours
Disconnect gap04812162024server time (h)Your trading hoursConnected (log: start)Connected (log: reconnect)
Illustrative times. A one-hour gap at 10:30-11:30 falls inside your trading hours: check whether the EA missed a signal then.

FAQ

Can I close a trade from my phone without logging in to the VPS?

Yes. Your broker's mobile app shows the same account, because the trades belong to the account, not to the VPS. You can close a trade there without opening the VPS at all. But if the EA is still running on the VPS, it may open the same trade again on its next signal, so pause the EA first if you want to stay out.

What happens to my EA if the VPS restarts?

The platform closes and the EA stops until the platform opens again. Check that automated trading is still switched on after a restart. Schedule system updates for the weekend, when the market is closed.

Related terms