Algorithmic Trading Strategy - Definition and How That Work

Algorithmic Trading System - Definition


The Algorithmic Trading is an automated system where computers make trading decisions based on algebraic equations describing the price action with numbers and formulas.

While observing the financial markets and the price action during a certain period, Forex traders could have noticed that the price action has repetitive conditions or cycles with the same performance. What’s more, the technical analysis and indicators could have similar patterns and signals, describing the price action in numbers. Trading signals, reversal conditions, breakouts, and accelerations come in line with certain parameters, which might be used to create a forex algorithm trading based on the if-then statement. This market’s feature is used in the creation of trading systems and strategies based on technical indicators.

With the technology revolution and the growing role of artificial intelligence in our everyday life, computers start to displace people from many professions. Computerized systems are also getting more and more popular in Forex trading because the machine, with a proper learning and precise algorithm, can deliver much more accurate results, execution speed and higher efficiency than human traders.

Computerization of the order flow in financial markets began in the early 1970s, with some landmarks being the introduction of the New York Stock Exchange's “designated order turnaround” system (DOT, and later SuperDOT), which routed orders electronically to the proper trading post, which executed them manually.

What is Algorithmic Trading Software?


Forex algorithmic trading software can describe the current market situation, determine the trend’s direction and identify support and resistance levels.
A set of such codes is used to create the best algorithmic trading software which can buy or sell financial assets without humans intervention. Any trader can program an algorithm of trading decisions, backtest it on the past performance, turn the software on to trade automatically and focus on something else instead of sitting in front of the trading terminal throughout days and weeks.

Technical parameters to describe the market conditions


Every technical indicator has several parameters describing the current market situation. For instance, the volatility of an asset can be measured by standard deviation used in Bollinger Bands indicator, rate spikes might be compared to the average true range included in the Average Directional Index formula, relation between average gain to average loss points to the strength of a trend reflected by Relative Strength Index and so on. A step-by-step calculation of those parameters creates a base for equations to formulate conditions to buy or sell a currency pair, stock, commodity or cryptocurrency. Trading algorithms consist of a set of those if-then equations.

For example, the simplest condition to enter the market might be shown as a comparison of the current price with the moving average value. If the rate becomes higher than the MA after being lower, then it’s time to buy an asset. And if the rate breaks through the MA from above, then short positions should be opened.

Additional factors used in if-then equations for algorithms


Besides the usual technical indicators, several additional factors could be analysed in terms of making trading decisions. Trading volume has an impact on volatility, enlarging the range of the price, overbought and oversold conditions influence the assets’ behaviour, sharp whipsaws and long shadows on candlesticks reflect strong resistance/support levels, etc. The algorithm could include multi-level conditioning in terms of trading decisions and profitable entries with a low number of false signals. Complicated calculations are tough for human traders, while automated trading systems can provide a large volume of computing much faster and easier.

How does Forex Algorithmic Trading Work?


The steps described above represent the Quantitative Analysis or Modeling thus a trader keen on developing algorithmic trading strategies has to obtain a certain experience in the technical analysis including the knowledge of mathematical formulas of technical indicators and their programming codes. Besides that, the creator of an automated system has to have great skills in coding using different programming languages. The most popular types of coding languages are Python, Mathlab, Perl, C++ and Java. MetaQuotes Corporation - the owner and developer of the most widely-used trading platform MetaTrader5 - have developed an own coding language MQL4 to interact with the terminal directly, creating Automated Expert Advisors and trading algorithms. Forex traders can develop do-it-yourself algorithms or purchase an existing solution connected to a terminal.
Here is a list of elements and steps required to create an automated trading system:
  • A trading idea based on technical indicators’ rules and combinations;
  • Quantitative analysis and modelling skills;
  • Programming skills and knowledge of different coding languages;
  • Historical quotes data to backtest a strategy;
  • Hardware and collocation facility to provide a fast connection to brokerage servers.


If you like this strategy, you might also be interested in this 10 Pips a day

What are the Best Algorithmic Trading Strategies?


Scalping algorithms based on ultra-short-term timeframes and extremely frequent entries and exits or High-Frequency Trading (HFT) became the most widely-used applications in automated trading as the ability of computers to analyse massive flows of data and the execution speed represent the main benefit of algorithmic trading. What’s more, the impact from the fundamental side of the analysis can be almost ignored on ultra-short-timeframes such as 5- or 1-minutes charts thus the technical analysis and mathematical modelling become much more significant in terms of short-term forecasts of the future rate. Even though potential profit is quite low compared to large trends used in swing and buy-and-hold strategies, the large number of opened positions in both buy- and sell-side allows counting on even larger overall profitability. The recent development of computerized trading solutions forced many broker companies and liquidity providers to offer extremely short-term timeframes such as 30-, 15-, 5- and even 1-second charts.

Depending on the main trading idea and the set of parameters used in the trading decisions, there are several types of algo models and mathematical methods. Below are the most popular ones.

Momentum-based trading strategies


One of the main factors describing the price action is the trend’s momentum, which reflects the strength of recent fluctuations compared to previous periods. The larger momentum is the wider price range and volatility are. Thus, traders could hold their profitable positions longer, open more traders in the same direction, adding the volume to maximize profits. At the same time, during a choppy trade with weak momentum, it’s hard to expect sharp rallies and strong trend, so the stop-loss and take-profit orders should be kept tight. What’s more, once the trend’s momentum is getting exhausted, the likelihood of a bearish or bullish reversal is getting higher and against-the-trend positions could become more attractive. The most popular technical indicators reflecting the trends momentum are MACD, ADX and RSI.

Mean reversion or trading range


In many cases, a security price has a certain median line acting as a magnetic level during whether a strong trend or sideways consolidation. Fluctuations above and below that line or curve are still in place, however, deep deviations allow traders to open positions in both directions even if the trend has a single-direction mode. For example, against-the-trend shorts during the upwards action is possible in case if certain conditions are met, while an opposite trading signal might occur after the retracement is over, giving an opportunity to open with-the-trend deal. Multiple Simple and Exponential Moving Averages with different periods, Bollinger Bands, Keltner Channel, Ichimoku Cloud - these are the most popular technical indicators used in mean reversion strategies.

Sentiment-based algorithms


The relation of average gain to average loss might reflect the current market sentiment. Several oscillators use the same approach to compare the number of bullish candles to bearish bars within a given period. Sentiment Zone Oscillator, Bear/Bull balance indicator, longs-to-shorts relation balance - those are the examples of such technical tools. Most of the Forex brokers provide the data of current market’s sentiment in terms of longs/shorts relation, while exchanges deliver such data as CBOE Volatility Index, High-Low indicator and long-term moving averages for algorithmic stock trading.

Algorithmic Trading Strategies Example


The wide variety of trading strategies based on technical indicators give Forex traders dozens of options to consider the main trading idea to implement in forex algorithmic trading. Here are several examples.

Moving Averages


The most simple example of rules based on Exponential Moving Average or any other types of smoothed moving averages, which act as resistance/support levels. Buy when the price breaks it from below and sell when a bearish breakthrough happens.
Algorithmic Trading Strategy - Definition and How That Work

Divergence-based reversal strategy


In case if slow MACD trend indicator prints lower highs while the price charts higher highs, a bearish divergence signals possible reversal. Fast RSI oscillator could confirm or deny the trading signal by its own divergence. The three-stage conditional equation is easy to compose in an algorithm, knowing indicators’ values.
Algorithmic Trading Strategy - Definition and How That Work

Algorithmic Trading Strategy - Definition and How That Work

Forex Momentum Ignition System


This example is related to opening trading positions against the current short-term trend on a resistance/support breakthrough. The main idea is that the market could have a false spike of the price, charting a long shadow above or below the strong technical level, while the close rate does not break it through. This is an against-the-trend approach when it comes to short-term fluctuations, but the main direction is usually chosen in accordance with the long-term primary trend.
Algorithmic Trading Strategy - Definition and How That Work

Advantages and Disadvantages of Algorithmic Trading System


Algorithmic trading software is able to open and close more deals than a human trader due to the speed of analysis and calculation. Software is free of emotional impact, which often leads to mistakes and wrong decisions by humans. Execution speed, the volume of computed and analyzed data and the overall efficiency of trading decisions make algo trading much more profitable and reliable than manual trading, especially when it comes to scalping strategies. At the same time, if fundamental conditions change, having a strong impact on the market’s sentiment, technical indicators might increase the number of false trading signals, forcing traders to adapt trading algorithms to a different environment.
See also: