Back
Compare Forex Brokers
  • Broker Awards
    • Best brokers by category
      • Best brokers for beginners
      • Lowest spread forex brokers
      • Best CFD brokers
      • Best crypto brokers
      • Best brokers for scalping
      • Lowest commission brokers
      • High leverage forex brokers
      • Best spread betting brokers
    • Country-specific recommendation
      • Australia
      • United Kingdom
      • United States
      • Canada
      • Singapore
      • United Arab Emirates
      • New Zealand
      • Malaysia
  • Trading Platforms
    • Best MT4 brokers
    • Best MT5 brokers
    • Best cTrader brokers
    • Best TradingView Brokers
    • Best automated trading software
    • Best copy trading platforms
  • Broker Reviews
    • Best Rated Forex Brokers
      • Pepperstone review
      • IC Markets review
      • Oanda Review
      • Saxo Markets review
      • Interactive Brokers review
      • Admirals review
      • IG Markets Review
      • All REVIEWS
  • About Us
    • The team
    • Our Methodology
    • Contact
  • Broker Awards
    • Best brokers by category
      • Best brokers for beginners
      • Lowest spread forex brokers
      • Best CFD brokers
      • Best crypto brokers
      • Best brokers for scalping
      • Lowest commission brokers
      • High leverage forex brokers
      • Best spread betting brokers
    • Country-specific recommendation
      • Australia
      • United Kingdom
      • United States
      • Canada
      • Singapore
      • United Arab Emirates
      • New Zealand
      • Malaysia
  • Trading Platforms
    • Best MT4 brokers
    • Best MT5 brokers
    • Best cTrader brokers
    • Best TradingView Brokers
    • Best automated trading software
    • Best copy trading platforms
  • Broker Reviews
    • Best Rated Forex Brokers
      • Pepperstone review
      • IC Markets review
      • Oanda Review
      • Saxo Markets review
      • Interactive Brokers review
      • Admirals review
      • IG Markets Review
      • All REVIEWS
  • About Us
    • The team
    • Our Methodology
    • Contact
menu
Home » Forex Trading » Forex algorithmic trading strategies

Forex Algorithmic Trading Strategies

The right forex algorithmic trading strategies are critical for successful automated trading.  Automating your cfd and forex trading can save you time but it can be difficult to know where to begin. This guide will help start your algo trading journey.

Written by Justin Grossbard

Edited by Sean A'Hearn

Fact Checked by David Levy

Edited by Sean A'Hearn

Fact Checked by David Levy

Updated: 07/09/2023

What Changed?

Each month we update average spreads data published by the brokers the retail brokers lose %

Fact Checked

We double-check broker fee details each month which is made possible through partner paid advertising. Learn more this here.
forex algorithmic trading strategies

Our forex comparisons and broker reviews are reader supported and we may receive payment when you click on a link to a partner site.

Table of Contents

  1. What are Forex Algorithmic Trading Strategies?
  2. Things to Consider When Deciding on Algo Strategies
  3. Five Types of Trading Algorithms
  4. How to Choose an Algo Trading Strategy
  5. Final Thoughts

Forex algorithmic trading strategies can save you time and deliver consistency when trading. With today’s technology, automated trading systems are now easier to create and manage. Complex programs once relegated to large financial institutions like hedge funds and investment banks can now be deployed by retail investors.

Many traders leverage various algorithms quite successfully. The tough part is figuring out where to start, and there are plenty of concepts to sift through.

  • Do you need to learn a programming language?
  • Should machine learning be part of the equation?
  • Which trading software works best with this or that trading platform?

This article is intended to help you answer those questions.

Algorithmic Trading Strategies

What This Article Covers

In this article we’ll cover the following topics:

  • What are Forex algo trading strategies
  • Things to consider when deciding on a strategy
  • Five types of Forex algorithm trading strategies
  • Tips on how to implement your own strategy (skills)
  • How to choose a strategy
  • And some final parting thoughts.

What Are Forex Algorithmic Trading Strategies?

People often assume that algorithms require a degree in data science, machine learning, or years of computer programming.

While those skills will help, algorithms range from simple to highly complex. And you don’t need to be a quant to understand them.

Here’s a great example.

Forex traders often look for increased volatility in the British Pound Sterling (GBP) or Euro (EUR) during the opening of the London trading session.

Let’s say one trader finds that through historical backtests that 60% of the time the Euro closes higher against the U.S. Dollar (USD) than it opened. That trader could develop a program that buys the EUR/USD currency pair at the opening of the London session and sells at the close.

From there, a trader can choose to either program time alerts so he or she can manually place the trade or set up an automated trading system that performs the transactions for you.

These days, everyone from retail traders to large hedge funds uses algorithmic trading strategies. In fact, that’s largely how funds that track market indexes operate.

Things To Consider When Deciding On Algo Strategies

Any Forex trading strategy needs to consider the following six elements:

Risk

Forex traders, whether day trading, swing trading, or investing need to size their risk correctly to ensure that no one trade or losing streak puts them out of business.

Risk is a measure of capital put at stake against possible losses and rewards. If I put up $100 of my $1,000 account into a trade, I’m risking 10% of my total capital. This is the most critical factor in determining the success of a trading system.

Any trading strategy has a probability of success and failure and a chance at a certain profit or loss. The interaction between risk and reward with the probability of success and loss creates variance.

You can think of variance as the volatility in outcomes if you repeated the same trade over and over.

For example, if I flip a coin 100 times and I make $1 for every time it comes up heads and loses $1 for each tail, I know that over time, I will break even on average. If you plotted the results of this experiment, you would see a line that bounces around $0. The chances that I hit 3 heads in a row are slim whereas 10 times in a row is nearly impossible.

Whether you trade the stock market or the forex market, managing your risk is what keeps you in the game over the long run.

Here’s an easy way to think about risk.

Let’s say I present you with a trade that has a 95% chance of winning. If you win, you get $1,000,000.

Now let’s assume that if you lose you have to pay me $1,000,000,000,000,000.

95% doesn’t look so good anymore.

Even 99.999% probably isn’t worth it.

And one thing more …

It doesn’t matter how much historical data you use, or how much backtesting you perform – there is ALWAYS a chance for human trader error no matter what your results say.

Leverage

In Forex, traders employ a concept known as leverage. Leverage allows you to control multiples of your money for trade. It goes hand in hand with risk management.

A leverage of 100x on a trade of $1,000 means you control $100,000 of buying power.

The type of product you trade also has a direct impact on the amount of leverage and risk. Contract for difference (CFD) products allow traders with small accounts to gain significant exposure to price movements in currency pairs. In the U.S., CFD products aren’t available, so traders can use currency futures to gain leverage.

What’s important to remember is that leverage uses borrowed funds. While you can make big gains, you can lose a lot as well. And since it’s borrowed funds, you could end up owing money in some cases.

Leverage

Time Frame And Market Conditions

Tunnel vision often plagues newer traders. They fail to look beyond the chart and technical indicators right in front of them. It creates a myopic view that prevents them from truly analysing the market.

Comprehensive trading systems look at the current time frame – the time measure for each bar or period on a chart – as well as several higher and lower.

For example. If I create a strategy that uses an hourly chart, it behooves me to analyse the daily time frame for the broader trend as well as the 30-minute time frame for short-term momentum.

Additionally, most currency trading works better when analysed in the context of the overall market.

Imagine buying the Turkish Lira against the EUR because of strong technical indicators when every other major currency points to weakness in the Lira. Especially with intraday price action on smaller time frames, you can find your trades quickly hitting stop-loss orders if you don’t look at the bigger picture.

Trading Time frame

Trading Platform

Not all trading platforms are compatible with algorithmic trading systems and automation. Check to make sure that both your broker and platform support algorithmic trading.

When in doubt, most algorithmic traders use MetaTrader 4 (MT4) which has become the industry standard platform for forex trading. MetaTrader 4 uses Expert Advisors (EAs) and robot programs so you can automate your trading. This is coupled with increased connectivity with servers based in the Equinix data centres next-door to the world’s largest exchanges. The broker that you choose to use will depend on the centres that they utilise. Some of these locations are listed below.

  • Sydney – Australia
  • London – UK
  • New York – USA

Other options to automate your trading include social trading and copy trading. While these do not use algorithms, they can automate your trading by allowing you to copy other successful traders.

Goals

Everyone gets into Forex trading for different reasons. Some of us want to enhance our retirement. Others want to generate wealth. Whatever your reason, it’s important to list your goals.

Goals follow a specific format – to achieve X results by Y time/date.

For example, I want to make $500 by May or I need to complete 30 trades this month.

Goals don’t need to be based on earnings. But with a trading algorithm, you should have regular milestones where you review the performance of your system. Always stick to a set of rules when managing your trading system otherwise you will fall into emotional decisions.

Personal Time Available

Lastly, it’s important to consider the amount of time you can dedicate to the project. If you work a full-time job, trying to manage a day trading system can be difficult if not impossible.

You also need to consider the amount of time and effort it takes to program and evaluate your algorithm. If you’re not proficient in Java, python, or other programming languages necessary to run your system, you’ll need to engage an outside programmer. Even if you can manage all the programming and backtesting yourself, it requires a significant amount of time and effort to create, backtest, implement, and then monitor your trading system.

Five Types Of Trading Algorithms

To get you started on your journey, here are five common strategies used to create Forex algorithms.

News Based

Economic events, as well as political votes, often influence foreign exchange markets. The more important the event, the higher the odds of significant price movements.

Think back to the historic Brexit vote and the huge price swings in the GBP afterward.

Next time you get a chance, look at the intraday price movement around an employment report and the corresponding currency pairs.

News-based algorithmic trading strategies generate trade signals based on real-time information. These trades are typically short in duration, lasting seconds to minutes.

With short-term trading strategies, it’s important to consider slippage. Slippage is the number of profits you give up due to the timing difference between the signal and the execution. With trades that rely on fast entries and exits, slippage becomes more important compared to swing trades which may last days.

Trend Based

Trend-based strategies are some of the most common and easiest to implement. These strategies attempt to follow along with trends or identify when they reverse.

Moving averages are commonly used for trend technical analysis.

For example, when the 200-period simple moving average is rising, a trend-following system might go long or buy the currency pair. When the moving average turns downward, the system could take it as a signal to enter sell orders.

Average Price/Mean Reversion

Many currency pairs and stocks often return to historical averages after significant price movements. Mean reversion strategies attempt to buy at extreme selloffs and sell at extreme runs with the expectation that prices will return to the average.

The problem is that extreme prices might occur for a reason and reset the averages over time.

For example, after the Brexit vote, the GBP sold off against the USD and stayed at lower levels for years. Financial markets can and do change over time. That’s why risk management is critical to being successful with mean reversion strategies.

Average Price Mean Reversion

High-Frequency Trading (HFT) (AKA Scalping)

This isn’t a strategy for novices. High-frequency trading attempts to make small amounts of profit over thousands if not hundreds of thousands of trades.

In fact, trades can last a fraction of a second, trying to exploit inefficiencies in the system.

Many of these types of strategies are limited to hedge funds or investment banks. Being successful in this category often requires significant capital investment.

While these strategies aren’t often available for the retail crowd, they do benefit from them. HFT strategies often add liquidity, albeit for a short period of time as well as tighten spreads.

Arbitrage

Imagine finding a Forex broker offering to sell you the EUR against the USD for 0.90. At the same time, you notice another broker offering to buy that same pair for 0.95.

You go in and buy from the first broker and then immediately sell it to the second broker making a profit of 0.05.

That’s arbitrage.

These trading opportunities come in various forms across all sorts of markets. They’re often exploited by high-frequency trading systems.

Finding price anomalies and disparities between markets has gotten more difficult given the pace and availability of technology as well as the cost of real-time market data. That’s why most retail traders tend to shy away from this option.

Arbitrage

How To Choose An Algo Trading Strategy

There are likely as many trading strategies out there as there are stars in the sky. Finding the one that works for you can be a challenge. If you’re not a programmer it can be even more difficult.

But here are some basic tips to help you find one that works for you.

  • Evaluate the complexity – Some strategies are inordinately complex. They come with thousands of lines of code and skills in quantitative trading to manage. The more complex a strategy, the harder it will be to fix. While they can cover all sorts of scenarios, they can also fall prey to over-optimization and curve fitting.
  • Define the type of strategy – While the list of strategies above is not exhaustive, you should understand how the strategy works. Trend-following strategies only work when markets are trending. News-based strategies only work around news events. This may seem obvious, but traders often try to force their strategies to work in environments it isn’t suited for.
  • Backtest for performance – To determine your risk parameters, you need to first measure your trading system. This includes win rate, average wins and losses, and standard deviation among others. Backtesting allows you to see how the strategy operates in various market conditions as well as typical results you might expect.
  • Test your strategy – Demo accounts are a great way to evaluate your algorithm in real time without risking money. This lets you see how the algo performs compared to backtests. However, demo accounts are not great for high-frequency trading and scalping strategy evaluation. Those require real word trials to account for slippage and fills.
  • Make sure it fits you – As we discussed earlier, not everyone has the time to trade or manage a system all day. Whichever strategy you choose needs to match your risk profile, time commitment, and understanding. If you aren’t comfortable with your strategy, you’re more likely to interfere with it.
  • Measure the costs – While algo trading programs are much more convenient for the market participants using them if you choose the wrong broker then you might incur some unwanted transaction costs. The price difference in the spreads at particularly volatile times will have an effect on your profit margins.

Final Thoughts

Automating a Forex trading system opens up a world of possibilities. For those who struggle with discretionary trading and controlling emotions, it’s a great way to mitigate these issues.

Even if you never plan to implement an automated strategy, understanding how they function can help you navigate the market.

About the author: Justin Grossbard

Justin Grossbard is the co-founder of CompareForexBrokers and since 2014 with the role of Strategic Head Of Research. He is a member of the AICD and holds a Master's and Bachelor's Degree in Commerce. He previously worked with the banking sector, including ANZ and is a contributor to Finance Magnates, Kiplinger and Forbes. He has also published a book on alternative investments which is available on Amazon.

Ask an Expert

Subscribe
Notify of
guest

guest

2 Responses
Inline Feedbacks
View all comments
london
london
1 year ago

What is a good broker to use for algo trading?

Reply
David Levy
Forex Expert
David Levy
1 year ago

We recommend any broker that offers STP or ECN trading execution. These brokers generally don’t place restrictions on your trading conditions allow you to make full use of automation tools and because they are using ECN or STP, spreads are likely to be low. If the broker has an account with commissions chances are it is an STP or ECN broker. We suggest not using a market maker broker as many don’t allow automation. Brokers to consider are Pepperstone, IC Markets, FP Markets, Eightcap, TMGM.

Reply

Other Education

  • Auto Trading Australia
  • Automate with Robots
  • best forex social trading
  • Best Forex Copy Traders
CompareForexBrokers Logo
  • ASIC Regulated Brokers
  • FCA Regulated Brokers
  • CIRO Regulated Brokers
  • CFTC Regulated Brokers
  • About Us
  • Our Methodology
  • Privacy Policy
  • Terms Of Service
  • Contact Us

Compare Forex Brokers Pty Ltd is an Authorised Representative of Guildfords Funds Management Pty Ltd Australian Financial Services Licence No. 471379 (A/R No. 001274082).
CompareForexBrokers is Copyright With All Rights Reserved. Trading Forex and CFDs with leverage poses significant risk of loss to your capital.

Back to top