The Emergence of Algorithm Forex Trading

data visualisation and trading image from Nanex
data visualisation and trading image from Nanex

Algorithm trading, or the use of computers to make automated trades on the financial markets, has its roots in the 1970s with the emergence of the first electronic exchanges. One of the first uses for program trading (as it was then more commonly known) was mainly used to break up large orders into lots of smaller simultaneous ones in order to prevent the stock price from changing too dramatically before the order could be completed. Later, other techniques, such as arbitrage, were developed and used widely by traders, and the practice of program trading became so widespread in the following decade that it was blamed for the market crash of 1987.


The real breakthrough came in the early 2000s, when IBM and HP demonstrated that algorithmic trading strategies they had developed could consistently out-perform human traders in a simulation. This sent shockwaves around the trading world, and efforts were redoubled across the board to develop new trading algorithms and find ways to improve their effectiveness.

High Frequency Trading (HFT)

One strategy that was proving particularly effective was known as high-frequency trading, or HFT for short. This involves making lots of very short-term trades, open for just a few seconds or less, in order to make small profits from the relatively predictable (from an algorithmic standpoint) short-term price movements of financial instruments such as currencies.

High-frequency-tradingLots of small, regular profits, amounted to big profits for the major institutional investors, but the effectiveness of this strategy was limited by the latency of connections to the major exchanges. This was addressed by the construction of dedicated trading stations situated geographically close to exchanges, connected by dedicated super-fast fibre optic connections. Some feel that this gives banks an unfair advantage in markets such as the forex market, but then again the banks have always had several major advantages over smaller investors in the forex market, such as greater liquidity, the ability to directly influence prices through large orders, lower trading costs, and so on.

Independent Investors Get a Look-In

While some complained – and still do – about the unfair advantage handed to the banks by algorithmic trading, some independent investors have been keen to find ways to leverage this emerging technology for themselves. The launch of the trading platform MetaTrader 4 (MT4) in 2005 brought algorithm trading within the reach of independent forex traders for the first time. Unlike institutional-level algo platforms, which commonly used programming languages such as C++ or Python to code their algorithms, MT4 used its own proprietary language called MQL4.

mql4Unlike languages such as C++, MQL4 was very easy to use, and didn’t require users to have university-level computing skills in order to write effective scripts for automating MT4. Users were writing their own algorithms and sharing them freely with others on the MQL4 online community, and before long a substantial library of free, open-source trading algorithms, indicators, and scripts had been built up. Also, there was an increasing market for paid-for programs, which gave developers a huge incentive to write for this platform. This, rather than any other functional advantages of the software, soon made it the default choice for independent traders, and today most brokerages offer MT4 alongside their own proprietary trading platforms, or even in some cases as the default option.

The Future For Independent Traders?

The runaway success of MT4 and MQL4 created a huge difficulty for rivals looking to enter the market. In fact, even the makers of MetaTrader themselves, Metaquotes software, struggled to gain a foothold with their sequel to MT4, MetaTrader 5, because it used a new and largely incompatible version of the MQL language, which meant that the library of algorithms was much smaller. However, in recent times, a few challengers have emerged that offer significant advantages over MT4 and MQL4.

quantconnectPerhaps the main threat to their dominance comes from the increasing popularity of the C# programming language, which is nearly as easy to use as MQL4 but is adopted across a much wider range of platforms, including QuantConnect and NinjaTrader. As a result, the library of freely-available algorithms written in this language is steadily increasing, and while it has a way to go yet, its rise to dominance of the algo trading scene for individual investors seems inevitable. Other innovations, such as the cloud-based backtesting of algorithms offered by services such as Quantopian and QuantConnect, which we covered a couple of weeks ago, offer a level of functionality for independent traders that had previously been the preserve of major institutional investors.

The Regulators Wade In

midasWhile it is clear that algorithm trading has a big part to play in the future of the forex market, there may be some obstacles ahead. Just as the market crash of 1987 was blamed on program trading, recent market events such as the ‘flash crash’ and the ‘hack crash’ have been largely attributed to the activities of high-frequency trading robots, and regulators are showing increasing concern as a result. In January of this year, the US Security and Exchange Commission launched a new unit to monitor the activities of high frequency traders, using a computer system known as Midas. While some have called for an outright ban on these activities, or a transaction tax that would effectively wipe out the profits of high frequency trades, the approach of the SEC hints at a certain degree of acceptance of and/or tolerance for HFT and algorithm trading as a whole.

From an independent forex trader’s point of view, the emergence of algorithm trading has been something of a mixed blessing. It has increased liquidity in the market, leading to tighter spreads, and has provided new money-making opportunities for those who have adopted algorithm trading techniques. On the other hand, it has made the markets much more unpredictable, almost to the point where some believe that rational analysis of price movements and fundamentals may become irrelevant. One thing is for sure, though – algorithm trading is not going to go away any time soon, and traders would be well advised to learn as much as they can about it if they are to stay ahead of the game.