Spread bets and CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 69% of retail investor accounts lose money when spread betting and/or trading CFDs with this provider. You should consider whether you understand how spread bets and CFDs work and whether you can afford to take the high risk of losing your money.

Algorithmic trading

Algorithmic trading is the process of using a computer program that follows instructions based on mathematical formulae, in order to make automated trading decisions.

By following the algorithm’s instructions, the computer makes the decisions for the trader as to whether to buy or sell within various financial markets, often by monitoring price charts. It will exit the position upon meeting the algorithm’s specified requirements.

See inside our platform

Get tight spreads, no hidden fees and access to 12,000 instruments.

What is automated trading?

Automated or algorithmic trading is an effective way of minimising risk when executing an order, as once the trader has chosen the model’s predefined principles, such as the exit price and position size, the computer makes the decisions based on this information. This lessens the likelihood of the trader making decisions based on emotion, rather than logic.

Automated trading software is predominantly used by hedge funds and investment banks, as algorithmic trading is most suitable for large orders, whether that be size or volume. Over 75% of share trades on U.S. stock exchanges originated from automated trading systems.

Algorithmic trading strategies

There are numerous algorithmic trading strategies which can be adopted by traders in order to save themselves both time and money.

High-frequency trading

This automated trading strategy involves placing a high volume of trades at a rapid speed in order to profit from small movements in price. Typically, the positions will be open for less than a minute or for just milliseconds. The aim of high-frequency trading​ is to make small profits, so there are often very high volumes of these trades occurring in one day. An algorithmic strategy for high-frequency trading is called scalping. In particular, scalping forex is common for trading currency pairs.

Arbitrage trading

Arbitrage strategies​ involve using an algorithm to monitor the market to find price differentials. This could be when two assets with identical cash flows aren’t trading at the same price, or when the same asset isn’t trading at the same price on all markets.

This could be useful if, for example, a stock is valued at one price on the New York Stock Exchange, but for less on the London Stock Exchange. This stock could be bought at the lower price on the NYSE, then sold on the LSE for a profit.

As these price differentials aren’t very common, it is useful to have an algorithm to locate them when they do occur. As these price differentials are often small, a large position is generally required to make a significant profit, such as in pairs trading​.

Trend following

Automated trading systems can be used to monitor the market and various price charts, identifying patterns that identify the best time to execute a trade. The algorithm can base these patterns on trends that occur in both historical and current data, but trends can also be based on technical indicators​, stochastic indicator, price movements, moving averages and mean reversion.

Mean reversion

Mean reversion​​ is an algorithmic strategy that makes the assumption that even if the price of a stock deviates due to common factors such as breaking market news, over time it will move back to the average price. The trading range of a particular asset needs to be identified, then the computer can detect the average price using analytics. Typically, the average asset price is calculated using historical data.

VWAP trading

The VWAP, volume-weighted average price, is a benchmark that traders can use to execute an order as close to the average intraday price as possible. This intraday calculation looks to calculate an asset’s typical price by multiplying it with volume for a selected period (e.g. 1 minute). You then keep a running total of cumulative TPV and cumulative volume, just adding volumes for each 1-minute period, or for whichever period the trader has selected, and then divide cumulative TPV by cumulative volume.

These algorithmic trading statistics will not be useful for determining trends as they are purely a historical average for that day. They can, however, be used to gauge whether or not a trader has overpaid for an asset earlier than its trading day.

TWAP trading

The TWAP trading strategy (time-weighted average price) aims to execute the order as close to the average price of the security as possible, over a specific time period. This is often over the course of one day, and a large order will be split into multiple small trades of equal volume across the trading day. The purpose of this algorithmic trading strategy is to minimise the market impact by executing a smaller volume of orders, as opposed to one large trade which could impact the price.

Join a trading community committed to your success

Forex algorithmic trading

When trading the forex market, the efficiency of algorithmic trading online means fewer hours spent monitoring the markets, as well as lower costs to carry out the trades. Algorithmic trading can also be useful when hedging trades, in particular, spot contracts, where foreign currencies are bought or sold for instant delivery.

Triangular arbitrage is one common forex algorithmic trading strategy. It involves currency trading in the forex market with exchange rate discrepancies for an overall profit. This popular forex strategy involves three stages:

  • Firstly, exchanging the initial currency (a) for a second (b)
  • Then exchanging the second currency (b) for the third (c)
  • And finally, exchanging the third currency (c) for the first (a)

The automated forex strategy​ is conducted exclusively via a computer, partially due to the rare occurrence of these opportunities, but also due to the speed at which the trades need to be carried out. A large amount of capital would typically be traded due to the fractional differences between currency prices.

Benefits of algorithmic trading

  • It avoids the likelihood of human error, caused by factors like emotion or fatigue.
  • Backtesting​​ can be implemented to test a trader’s algorithmic strategy against historical data, in order to improve its accuracy, overall helping to minimise the potential risk.
  • Trades are executed more effectively as the computer follows instructions for the optimal buying or selling conditions, as well as timing trades to avoid price changes or slippage​.
  • It is more efficient, as computers can action trades over fractions of a second, which is something that humans simply cannot do. This means that less time is spent monitoring financial markets.
  • Algorithmic trading can limit or reduce transaction costs, due to the lack of human intervention.
  • Complex mathematical calculations that would be too difficult for traders to perform themselves are done within seconds on a computer.
  • It allows traders to use multiple strategies at one time, as well as having a consistent trading plan.

Drawbacks of an algorithmic trading system

  • There is a risk that any fault with the algorithm or internet connectivity problems could lead to orders not being placed, duplicate orders being actioned, or even erroneous positions being taken.
  • It can lead to spikes in volatility, as these algorithms react to market conditions, potentially widening bid-ask spreads or not placing certain trades, which could ultimately harm liquidity.
  • High-frequency trading can amplify systemic risk by transmitting shocks across markets when combined with other factors. There is an argument that high-frequency algorithmic trading played a part in the Flash Crash in 2010, where the Dow Jones Industrial Average plummeted more than 1,000 points in 10 minutes.
  • Faulty algorithms can cause ripple effects across other markets, resulting in amplified losses.

How to learn algorithmic trading

Algorithmic trading can be a complex process and is mainly used by traders with a higher level of experience and knowledge. To get started, we would advise you to consult our learn to trade section. This is complete with step-by-step guides and tutorials to learn CFD trading and spread betting courses, which will help to familiarise yourself with our products. Our in-depth trading guides provide information on how to master basic and advanced strategies, in addition to learning about technical indicators and forms of analysis for your trading plan. You can also read about our automated execution tools on the Next Generation platform, which means that market orders get filled at the next available price.

Powerful trading on the go

Seamlessly open and close trades, track your progress and set up alerts

Try our automated trading platform

Overall, algorithmic trading is a useful tool for professional traders to increase the volume of trades that they can make, while mitigating the risk of human emotion or error that negatively affects trades. It should, however, not be used as a substitute for careful manual trading, nor should any associated risks be underestimated. Algorithmic trading requires very similar skills to another type of automated trading, known as quantitative trading​. Learn more about our award-winning trading platform and all of the unique charting features.

MT4 automated trading

Interested in algorithmic trading online? Find out more about our automated trading platform that is popular across the global financial markets, MetaTrader 4. You can also open an MT4 account here.


Hello, we noticed that you’re in the UK.

The content on this page is not intended for UK customers. Please visit our UK website.

Go to UK site