
Trading strategies
Algorithmic Trading – Definition, Strategies and Algo Trading Software
Algorithmic trading involves automating order execution to save time, minimize human error, and make trading faster. In this guide, we share some information you should know about ‘algo’ trading, including how it works, popular algorithmic trading strategies, and how to get started.
What is algorithmic trading?
Algorithmic trading, also called automated trading, algo-trading, or black-box trading, uses computer programs to execute trades based on a predefined set of instructions. These instructions, or algorithms, are built around specific criteria, such as timing, price, volume, or technical indicators.
Once an algorithm has been programmed, it scans the financial markets and automatically places trades when the predefined conditions are met. This eliminates the need for manual intervention and allows for high-speed, high-frequency trading that’s impossible for a human trader to achieve on their own.
History and development of algorithmic trading
Until the 1970s, trading decisions were made based on fundamental and technical analysis. Traders would study company financials, industry trends, chart patterns, and other indicators to predict price movements manually. The first shift towards automation started in the 1970s, when exchanges started using computers to match buy and sell orders. In the 1980s, institutions adopted program trading to execute large baskets of stocks in response to market index changes.
During the early 1990s and early 2000s, computing power and internet speeds advanced rapidly. This led to the development of high-frequency trading (HFT), a form of algorithmic trading that executes thousands of orders in fractions of a second. HFT had many benefits, including increasing market liquidity and tightening bid-ask spreads, but it also raised concerns about market stability and fairness.
At the same time, traditional phone-based trading started to be replaced with electronic trading platforms, which allowed traders to automatically execute trades when specific conditions were met (e.g. setting take-profit or stop-loss orders).
More recently, we’ve seen algorithmic trading grow even more sophisticated with the rise of artificial intelligence (AI) and machine learning (ML). With these technologies, algorithms can continuously optimize strategies by learning from market data and identifying complex patterns beyond human analysis.
How algorithmic trading works
Imagine a trader using the following strategy:
- Buy 100 shares of a stock when its 20-day moving average crosses above its 100-day moving average (a potential bullish signal).
- Sell those shares when the 20-day moving average crosses below the 100-day average (a potential bearish signal).
The trader programs these rules into an algorithm, which then continuously monitors the stock price and moving averages and executes the trades when the conditions are met. Meanwhile, the trader doesn’t need to monitor prices or place the orders manually – it all happens automatically.
Advantages and disadvantages of algorithmic trading
Advantages of algorithmic trading
Algorithmic trading has many advantages, including:
- Best execution & low latency: Algorithms can execute trades at the best possible price, and do it instantly to minimize slippage.
- Lower transaction costs: Automated systems can execute trades more efficiently and with fewer resources than manual trading, helping reduce overall costs.
- Minimized market impact: Algorithms can break large-volume trades down into smaller batches and monitor market conditions to avoid driving up the price.
- Emotion-free decision making: Because algorithms follow predefined rules, they eliminate the influence of human emotions, impulse, or panic, allowing traders to stick to their strategies.
- Real-time monitoring & multi-tasking: Algorithms can monitor multiple markets and instruments simultaneously, far beyond what a human could track on their own.
- Backtesting capability: Traders can test their strategies using historical data to gauge its effectiveness before they implement it. Even though back testing can test the functionality of an algorithm, past performance is not indicative of future results.
Disadvantages of algorithmic trading
Algorithmic trading also has its own share of drawbacks, which include:
- Latency & execution risk: Algo trading relies on fast execution, but if a trade isn’t executed fast enough (i.e. due to poor internet connection or overloaded servers), it could lead to missed opportunities or losses.
- Dependence on technology: Algorithmic trading is entirely dependent on software and high-speed internet connections. Any technical issues or failures could interrupt trading and lead to unexpected losses.
- Black swan events: Most algorithms use historical data and mathematical models to predict future market movements, which means they may fail during unpredictable market disruptions and lead to losses.
- Regulatory compliance: Algorithmic traders are required to adhere to various regulatory requirements, which might involve reporting requirements that can be complex and time-consuming to deal with.
- High development costs: The costs of building, testing, and implementing complex algorithmic trading systems can be high, and traders might also have to pay ongoing fees for software.
- Limited flexibility: Algorithms follow strict predefined rules, which might lead to missing opportunities that fall outside their programmed criteria.
Algorithmic trading strategies
Trend-following strategies
One of the simplest and most common algo-trading strategies is trend-following, which uses indicators like moving averages to buy when prices show an upward trend and sell when prices start trending down.
Trend-following is simple because you don’t need to predict any future prices, you’re simply executing trades based on what’s already happening in the market. For example, if gold’s 50-day moving average is higher than its 200-day moving average, your algorithm might automatically buy gold with the expectation the upward trend will continue.
Arbitrage opportunities
Arbitrage involves spotting and exploiting price differences between two or more markets. For example, you might buy a dual-listed stock at a lower price in one exchange and sell it at a higher price on another.
These gaps don’t last long, so speed is essential. You can use algorithms to scan multiple markets quickly, detect discrepancies, and execute both sides of the trade before the gap closes.
Index fund rebalancing
Index funds periodically rebalance their portfolios to align their holdings with their benchmark indices, which can create short-term price movements in the affected stocks. If you can anticipate these moves before they happen, you can position yourself in advance to potentially capture small gains from the price adjustment.
For example, if Tesla is being added to the S&P 500, index funds will have to buy millions of Tesla shares on a set day. You can set your algorithm to buy Tesla stocks beforehand, and sell them after the index funds finish buying to capture the price bump.
Mean reversion strategies
Mean reversion assumes that an asset’s price will eventually move back towards its mean (average) value. In this strategy, you’ll identify a price range and use algorithms to buy when an asset is undervalued (below average) and sell when it’s overvalued (above average).
For example, if Microsoft usually trades at $300 but dips to $285 for no clear reason, your algorithm may buy at that price with the expectation that it’ll move back to $300.
VWAP and TWAP strategies
VWAP and TWAP strategies are often used by financial institutions to trade large orders while minimizing market impact:
- Volume-weighted average price (VWAP) involves splitting a large order into smaller chunks based on when the most trading volume happens during the day. For example, if Apple stocks are mostly traded at 10 a.m. and 2 p.m., the algorithm might focus orders during those times.
- Time-weighted average price (TWAP) involves splitting a larger order into equal parts that are executed over time. For example, you might sell 10,000 shares evenly over the next 4 hours.
Tools and technologies used in algorithmic trading
Strategy is just one part of algorithmic trading, the other part involves having the right tools and technology to design, test, and execute trades quickly and efficiently. Let’s look at some of the tools used for algorithmic trading, although in many cases you’ll be fine with just an advanced trading platform.
Programming languages
Traditionally, algo traders used programming languages like Python, R, or C++ to build and customize their strategies. These days, however, many brokers offer algorithmic tools so you don’t need to learn any programming.
Machine learning and AI integration
Many institutional traders (and some advanced retail traders) use machine learning models to make strategies adaptive. These models can adjust to changing volatility, process alternative data to generate trading signals (e.g. news sentiment or social media), and continuously tweak trade execution rules. This is, however, a more advanced level of algorithmic trading and not required when you’re just starting out.
Low latency infrastructure
Execution speed – down to the millisecond – is essential in algorithmic trading. To reduce latency, some advanced traders use colocation, where trading servers are hosted physically close to the exchange’s servers. Direct market access can also reduce latency by allowing traders to connect directly to the exchange order book rather than routing through multiple intermediaries. Again, this isn’t something you need to worry about when you’re getting started.
Examples of algorithmic trading applications
High-frequency trading (HFT)
High-frequency trading is a broad category of algo trading. It involves using sophisticated algorithms to place and cancel large numbers of orders at extremely high speeds – we’re talking microseconds.
There’s no single type of HFT – it can be applied to multiple strategies – however common themes include using colocation, specialized order types, very short-term horizons, and high cancellation rates. It’s common in equities, futures, and forex markets, but has also been linked to market volatility, most notably during the 2010 Flash Crash.
Market-making algorithms
Market-making algorithms continuously place buy and sell limit orders on both sides of the market, with the aim of providing liquidity. Buy limit orders are placed below the current market price while sell limit orders are placed above the current market price. The goal is to repeatedly capture the bid-ask spread.
For example, if the bid-ask spread for a stock is $50.00/$50.05, a market maker might buy at $50.00 and sell at $50.05 to earn $0.05 per share.
Cryptocurrency algorithmic trading
In the cryptocurrency market, trading bots are often used to buy and sell crypto based on pre-defined rules. These bots operate 24/7 and connect to exchanges using application programming interfaces (APIs).
Like other forms of algo trading, crypto bots use sophisticated algorithms to identify patterns, analyze market data, and execute trades without manual intervention. They can be programmed to implement various strategies, including moving averages, relative strength index (RSI) strategies, and Bollinger Bands, amongst others.
Choosing algorithmic trading software and platforms
Algorithmic trading platforms for beginners
If you’re a beginner without programming experience, your best bet is to use a low-code or no-code tool to build automated strategies easily.
Getting started with algorithmic trading
Learning algorithmic trading fundamentals
Before you jump into algo trading, it’s essential to understand both trading principles and how automation works. We’ve already covered the basics of algorithmic trading in this guide, but it doesn’t hurt to dive deeper with some books or algorithmic trading courses.
Building your first trading algorithm
Once you’ve gotten a solid foundation, you can start building your first trading algorithm. Try to avoid going too complex here – it’s best to begin with a simple rules-based system that you can test and refine.
Share this:
Latest research
Read latest researchOpen an account in minutes
Experience award-winning platforms with fast and secure execution.
Go to our Trading Academy
Choose one of our four market-leading educational courses.
A better trading experience
Discover how FOREX.com's platforms can give you an edge.
Economic calendar
Algorithmic trading FAQs

80-20 pattern in trading
Trading strategies
|
8 minutes read
The 80-20 rule, also known as the Pareto Principle, states that roughly 80% of outcomes come from around 20% of inputs. You can see this pattern everywhere. For example, in business management, 20% of customers might drive 80% of sales, while in software development, 20% of code might cause 80% of bugs. When it comes to trading, the Pareto Principle means that most of a trader’s profits might come from a small number of trades, strategies, or even time periods. Taking the time to recognize which of your efforts are most effective, and focusing your attention on them, can help reduce overthinking and potentially maximize returns. In this article, we share all you need to know about the 80-20 pattern in trading, including what it means, how it shows up, and how you can apply it to your strategies.

A guide to volatility trading, its causes, and the most volatile markets
Trading strategies
|
5 minutes read
Markets are always on the move, but the speed and size of price changes is what creates excitement (and risk) for traders. So, let’s take a look at the trading opportunities with volatility and which markets experience the highest levels of volatility.
Algorithmic Trading – Definition, Strategies and Algo Trading Software
Trading strategies
|
6 minutes read
Algorithmic trading involves automating order execution to save time, minimize human error, and make trading faster. In this guide, we share some information you should know about ‘algo’ trading, including how it works, popular algorithmic trading strategies, and how to get started.
The information on this website is not targeted at the general public of any particular country. It is not intended for distribution to residents in any country where such distribution or use would contravene any local law or regulatory requirement. The information and opinions in this report are for general information use only and are not intended as an offer or solicitation with respect to the purchase or sale of any currency or CFD contract. All opinions and information contained in this report are subject to change without notice. This report has been prepared without regard to the specific investment objectives, financial situation and needs of any particular recipient. Any references to historical price movements or levels is informational based on our analysis and we do not represent or warranty that any such movements or levels are likely to reoccur in the future. While the information contained herein was obtained from sources believed to be reliable, author does not guarantee its accuracy or completeness, nor does author assume any liability for any direct, indirect or consequential loss that may result from the reliance by any person upon any such information or opinions.
Futures, Options on Futures, Foreign Exchange and other leveraged products involves significant risk of loss and is not suitable for all investors. Losses can exceed your deposits. Increasing leverage increases risk. Spot Gold and Silver contracts are not subject to regulation under the U.S. Commodity Exchange Act. Contracts for Difference (CFDs) are not available for US residents. Before deciding to trade forex, commodity futures, or digital assets, you should carefully consider your financial objectives, level of experience and risk appetite. Any opinions, news, research, analyses, prices or other information contained herein is intended as general information about the subject matter covered and is provided with the understanding that we do not provide any investment, legal, or tax advice. You should consult with appropriate counsel or other advisors on all investment, legal, or tax matters. References to FOREX.com or GAIN Capital refer to StoneX Group Inc. and its subsidiaries. Please read Characteristics and Risks of Standardized Options.




