Algo trading for beginners – what is it and where to start

What is algorithmic trading (algorithmic trading)

The term “algorithmic trading” has two meanings:

  1. Automation of transactions on the stock exchange is a process that allows the system to make transactions without human intervention. You just need to set certain parameters (price range, list of tools, etc.) - and you can go about your business. The robot will perform all the necessary actions without you. This will minimize the human factor, eliminate the emotional component and, ultimately, save time.
  2. The process of executing a large application, which is divided into smaller ones. Let me explain with an example. Let's say you need to purchase 100,000 shares of a company. The system allows you to buy no more than 5 securities within one transaction. Accordingly, there is a need for routine work, which consists of creating applications after a certain time period. Algorithmic trading will do this for you.

So, the main goals of algorithmic trading are to speed up the process of making transactions and save the trader’s time.

Robot settings and integration with the exchange

Today, many exchanges allow you to integrate trading robots that will execute trades offline. The most popular exchanges among users remain such exchanges as Binance, Binance Futures, Bybit, Bittrex, Bitfinex, Huobi, Okex, Kraken, Poloniex and others.

To configure the robot you need to:

  • have a non-zero balance on the crypto exchange;
  • connect API keys to the exchange;
  • choose a trading balance and strategy;
  • set the maximum drawdown level for the robot (protection against market spills).

After the settings, the robot will begin to make transactions automatically according to the selected strategy and within the established limit.

What is its essence

Algo trading uses mathematical models to determine the maximum probability of making a profit. As you probably already guessed, algorithmic trading is based on the theory of probability. In addition, the robot analyzes historical data on quotes and calculates favorable moments for opening positions, selling or buying assets.

This process is carried out in one of the following ways:

  • manually – a specialist independently selects data using mathematical models. A reasonable question arises here: what about automation? The fact is that you can use a specific model, and for this you do not need to buy a software package. Let's say you only make trades in certain stocks. All you need to do is determine the price range based on historical lows and highs. Then it is enough to set the necessary parameters in the trading system, and the trading process will be carried out without the presence of a person;
  • automatically. Here you will already need software that contains an extensive base for analysis and calculations. The program will calculate all the necessary indicators, the expected result of the transaction and other parameters;
  • using artificial intelligence. When choosing this method of algorithmic trading, the rules for making transactions are set by the quantum robot independently.

About types of trading robots

Today, there are several types of robots for trading on the crypto market on the market. Here are the most popular:

  • desktop single-user robots that are installed on the user’s computer. Trading on them is possible only when the computer is turned on and connected to the Internet; the settings are complex and require knowledge not only in the field of trading, but also in installing complex software;
  • semi-automated robots that give signals to buy and sell, but do not execute the transactions themselves;
  • multi-threaded fully automated robots that give buy/sell signals and independently carry out transactions. As a rule, such robots work on cloud servers and there is no need to be online or keep the computer turned on. In addition, robots are easy to set up and do not require additional knowledge.

“Our company’s robots operate on the principle of full automation - set them up once, then monitor transactions and statistics ,” explains Ivan Shcherbakov.

Depending on the trader’s competencies, two types of robots can be used: with ready-made strategies and with customized strategies.

Trading with robots is available for all trading pairs with USDT, BTC and ETH, which are presented on the crypto exchange selected by the user. Depending on his competencies, a trader can set up trading on all pairs or several, or reduce the risk and trade only one pair in which he has more confidence.

Another separate type of robot is the autofollowing robot. In this case, the algorithm is always the same - automatic entry into transactions based on signals from an analyst or artificial intelligence, automatic exit according to the selected one of three strategies.

How and when did algorithmic trading appear?

The first automated trading system was created on the NASDAQ exchange in the early 70s of the last century. Electronic transactions with assets were officially allowed in 1998 in the United States and actively developed until the crisis of 2008–2009. After 2012, their volume decreased slightly due to a large number of errors in the algorithms and amounted to approximately 50% of the total number of transactions.

The coronavirus pandemic in 2022 has contributed to the development of e-commerce. By the end of 2022, some companies in Russia began to conduct more than 90% of transactions electronically.

Most of all, HFT-trading (high-frequency algorithmic trading) is used in banks and hedge funds. These large market participants have a staff of highly qualified specialists who develop and implement new algorithmic trading strategies.

Making changes to the trading algorithm

Traders should understand that the trading algorithm requires periodic changes. After all, the situation in the markets changes, the traders themselves change. Therefore, periodic changes in the algorithm will occur in any case.

It is not uncommon for traders to become so attached to their trading algorithm and not want to make any changes to it, which leads to frequent and the same losses and situations. Thanks to changes in the algorithm, the trader again began to make a stable profit.

Types of algorithms

Here is a brief overview of the types of algorithms used in stock trading.

  1. Algorithms for executing orders. They are based on the criteria of price minimums and maximums, time-weighted average price and volume. In simple words, the user should set a condition that the algorithm will fulfill at a certain moment. For example, if the price drops to such and such a value, sell (or buy). Algo trading allows you to do this quickly, while the price is at the desired level. If necessary, you can distribute orders into smaller ones to minimize risks.
  2. Algorithms of behavioral factors. Here the actions of traders making similar transactions are analyzed. For example: one large investor always buys bonds if the national currency falls within a certain period. This means that his actions are taken as a basis. This is roughly how this algorithmic trading method works.
  3. Scalping algorithms are based on a large number of speculative trades over a short period. As you may have guessed, this method is suitable for intraday trading.
  4. Predictive algorithms use historical data and mathematical models. For example, if a trend line is as close as possible to another line in previous periods, those who traded within a certain range received the maximum profit. The system takes this as a template and acts in a similar manner. Artificial intelligence is also involved here, which connects methods of fundamental analysis of the company based on reporting data and government statistics.

Rebound from level

When a strong local level is formed or the price approaches the historical level, a rebound from the level can be predicted. Rebounds are easier to predict and occur much more often in the market, in contrast to real breakouts. False breakouts also often precede relatively significant rebounds from levels. When trading on rebounds, it is better to use stricter risk management. Entry is made exclusively using a pending order (buy stop/sell stop). It is better to focus stop loss on technical levels and not exceed a value of 20 pp for currency pairs. It is also recommended to maintain a minimum ratio of SL/TP=1/3. Rebound patterns that can be traded:

  • rebound from strong historical levels;
  • rebound from the mirror historical level;
  • rebound from channel boundaries;

Algorithmic trading in the stock market

Algo trading in the stock market is used in large companies and is divided into several types:

  • pairs trading and basket trading. This type tracks the deviations of two or more assets that are correlated with each other. For example, if Gazprom shares rise, what is the likelihood that shares of other companies in the oil and gas sector will rise? Calculation of such deviations in the weighted average version allows you to make a profit;
  • front running – identifying large orders, the quick execution of which will set the price in the desired direction;
  • arbitration. This method is close to basket trading, but it is applied to instruments whose correlation is close to 1. These could be, for example, ordinary and preferred shares of the same company or bonds with the same coupon and maturity dates;
  • technical analysis - this method of algorithmic trading is based on the same fundamental analysis: historical data, indicators, trend lines, etc.;
  • market-trading – making transactions, the profit from which is ensured not through personal gain, but from rewards. Sometimes, in order to increase the demand for securities, a large number of transactions are carried out, for which traders receive certain bonuses;
  • volatility trading. This algorithmic trading method is characterized by a high level of risk. It is based on the purchase of options with the aim of increasing the volatility of certain securities. The method requires the participation of qualified specialists and the use of powerful computing programs.

The influence of sellers and buyers on price movement

All market participants can be divided into two groups: dynamic and static. Static players work at the same price in accordance with the derived levels (trading pending orders based on historical and technical levels). This is how grids are built for a market instrument with large volumes of funds aimed at the likely development of the asset price. Dynamic players often work against static positions. The balance of all market participants influences the price movement of a trading instrument. Therefore, from the graph it is always possible to distinguish patterns of consequences of the influence of the balance of participants.

Let's look at the most basic patterns of price movement: Accumulation - a set of positions by static players. This form of price behavior is characteristic of a trend. Static players gradually move the price towards target levels. Dynamic players cannot push the price in the opposite direction. Transactions are fixed and the set of positions continues.


Distribution - completion of a set of positions by static participants. This model precedes a change in trend or its long-term correction, as well as the transition to consolidation for an asset. Static players remove control of positions and the price exhausts the trend with strong movements.


If we develop the theory of counteraction between two types of market participants, we can derive many patterns for different market instruments. Since the price of different assets works out technical patterns in different ways. Pressing the price to a level with a different balance of volumes and participants gives different models of breaking through levels or rebounding from levels.

Algorithmic Forex trading

Algo trading is also widely used in Forex trading. Quantum robots are built into MetaTrader trading terminals and can even be used on the home computer of an exchange trader.

The robot is selected based on your personal trading strategy. When selecting, all the necessary parameters are taken into account: indicators, volatility threshold, etc. Next, the algorithm is written in a special programming language. After this, it is tested based on historical data.

Algo trading, as trading using robo-advisors, of course, carries a certain risk. Therefore, novice traders are recommended to study the market on their own, understand how to trade manually, and it is better to use a robot as an assistant to eliminate the human factor. There is literature for this, a list of which we will provide at the end of the article, but for now I offer you a brief overview of programs for algorithmic trading.

Let's summarize a little

A truly correct and balanced trade on Forex can only be made by consistently answering the following questions:

  1. Are there any working conditions for a professional participant?
  2. What is the price of his limit order?
  3. Is he entering or exiting the market?
  4. How do derivatives market participants act?
  5. what is the potential of the expected movement?
  6. when and with what volume to enter a position and when to exit it?

Actually, the answers to these questions are listed in the trading algorithm presented above. It will not be possible to answer them any other way, nor will it be possible to leave at least one of the questions unanswered. Therefore, I don’t understand what a trader is doing in the market with painted charts, and what the new “ultra-precise” indicators that appear every day show)))

Trading results using the above Forex trading strategy can be found in the following articles:

  • USD/CHF trade (09/06/2016)
  • The story of one quarter on Forex
  • Technical analysis
  • How to day trade
  • Psychology in trading
  • Trade without risk. Money management
  • What you need to know about the risks
  • The difference between a trader and an investor

Review of programs for algorithmic trading

  1. WealthLab. Uses quotes obtained from various sources. Language – C#.
  2. TSLab is a Russian product, in C#. Suitable for both beginners and advanced users. Can be used for algorithmic trading on Forex and the stock market.
  3. R Studio is a service for advanced users of algorithmic trading. Includes several options (development and testing of algorithms, mathematical models, obtaining statistical data, etc.). Combines several programming languages.
  4. EToro. This program is focused on cryptocurrencies, but can work with any type of financial instrument. Since EToro is a product of the broker of the same name, there is a commission of 375 rubles. ($5 or 145 UAH) for withdrawal of funds.

Algo trading strategies

  1. Time Weighted Average Price (TWAP). The strategy works like this: transactions are made at equal time intervals at the most favorable purchase or sale prices.
  2. Volume weighted average price (VWAP). Here, the order is split into equal parts, which are distributed evenly within the period, and positions are opened at a price not exceeding the weighted average.
  3. Iceberg. The strategy limits the number of orders for a specific instrument.
  4. A speculative algorithmic trading strategy selects the most favorable price for opening a position.
  5. Data Mining develops new algorithms by searching for different patterns based on historical data.
  6. Execution Strategy is used for large transactions carried out by brokers and hedge funds.

Step-by-step instructions for a beginning algorithmic trader

So, where to start if you decide to try algorithmic trading? First of all, you need to decide for what purpose you need it. Suppose you have a goal - long-term investing or making a profit from price differences, but you don’t have time to constantly sit at the computer and monitor the market. Plus, you have a good understanding of both the stock market and programming languages. Then the action plan will be like this.

Collecting useful information

Despite the fact that elements of technical analysis are included in the program, it is recommended to independently study the data on the instrument you are interested in. What you need to pay attention to:

  • market entry point;
  • support and resistance levels;
  • stop loss and take profit (you can read how they are calculated in the articles of the same name);
  • level breakdowns.

Creating a trading algorithm

Having chosen one of the strategies listed above, start creating an algorithm. To create a trading robot yourself, you will need knowledge of programming languages:

  • C#;
  • C++;
  • Java;
  • R;
  • MathLab;
  • Python, etc.

If you do not have the appropriate skills, you can use a constructor that will create a trading advisor for you. Use special platforms for algorithmic trading, for example:

  • MetaTrader;
  • TradeStation;
  • TSLab et al.

Historical testing

As mentioned above, each algorithm is subject to mandatory testing. It goes something like this: you run your algorithm on trades that have been made previously.

For example, you have data that investor X in such and such a year bought 100,000 shares of company Y at a price of 75 rubles. ($1 or 29 UAH) per security and received a profit from this transaction in the amount of RUB 3,750,000. ($50,000 or 1,450,000 UAH). You set the parameters: entry price, data on quotes over a time period, number of securities, minimums and maximums, etc.

If the algorithm produces a result close to the actual one, this means that the testing was successful. Several such tests are carried out.

Launch into real trading

After successfully passing the tests, you can begin real algorithmic trading. It is recommended to start with small transactions. Do not forget that algorithms do not last forever, since the market changes, and if you manage to earn money within 3 years, this is a very good result.

If you decide to become an algorithmic trader, you simply need to understand robots. Large players spend a lot of money on creating long-term systems, and for beginners it is recommended to periodically monitor algorithmic trading robots that have been successfully operating for at least 2 years.

Level breakdown

A breakdown often occurs due to strong, prolonged consolidation in the area of ​​the historical level and/or in the absence of nearby significant levels. The characteristic price behavior preceding a breakout is a squeeze towards the level and prolonged consolidation. If the price moved towards the level much faster, a rebound pattern is more likely to occur. Entry to the market is made using pending orders, only after the formation of characteristic prerequisites. The probability of a breakdown of the historical level or channel boundaries will be preferable for opening positions. It is better not to consider the possibility of a breakout of the mirror level.

The false breakout pattern is quite common. A common false breakout is observed at the moment of price compression with a possible subsequent correction and development of the rebound pattern. Strengthening consolidation and repetition of false breakouts may also occur. It appears in the form of a level being broken by one candle. Other false breakouts are classified as more complex patterns or failed breakouts. Such breakouts may consist of several candles, but the price will not be fixed at the level.

Advantages and disadvantages

The advantages of algorithmic trading are as follows:

  1. Save time.
  2. Speed ​​of transactions.
  3. Lack of the human factor and emotional component.
  4. Ability to work 24 hours a day.
  5. High quality diversification. The wide range of assets and strategies that the advisor has in its arsenal is quite difficult to use when working manually.

Flaws:

  1. The need for technical skills (programming languages, knowledge of the specifics of the work of trading advisors).
  2. No forecasts. Robots cannot make forecasts; they can only use historical data.
  3. Robots do not have intuition, which is sometimes simply necessary in stock trading.
  4. Internet failures. If your Internet is turned off at the time of making a transaction, this may cause losses.

Risks associated with automated trading

We have examined the general disadvantages, and now we will analyze in more detail the risks of algorithmic trading.

Operational risks

These, in fact, are those very technical problems: interruptions in the Internet, overloading of servers and, finally, developer errors that were not identified during testing of the algorithm.

The volatility problem

As we know, volatility is a change in the price of an asset over a wide range. In algorithmic trading, volatility is caused by a large number of transactions in certain instruments. There is no justification for such price jumps; it is simply that the increased activity created by algorithmic trading programs stimulates high demand. This distorts the real picture, and the financial results from such operations are often not supported by anything.

How much does it cost to develop a trading platform?

The price depends on the number of working hours and the hourly rate of the performers. The table shows averages for the North American market. In other countries, the rate is usually lower, and therefore the development cost is lower.

Now you know all the points you need to consider when developing a stock trading platform . All that remains is to find developers who have an idea of ​​how to create such products and will offer their services at a reasonable price.

Examples of using

Let's look at a simple example with Philips stock (PSX). These securities are traded on the New York and Frankfurt stock exchanges. The trading algorithm must take into account certain parameters. Let's formulate them in the table:

ParameterNew York Stock ExchangeFrankfurt stock exchange
Opening time (MSK)16:3011:00
Closing time (MSK)23:3020:00
CurrencyUSDEUR

What requirements for the robot should be included in the algorithm?

  1. Promptly obtain current price charts.
  2. Automatic recalculation of prices in dollars and euros.
  3. Placing orders on the exchange where the exchange rate is more favorable. You should be especially careful during overlapping trading hours. In our case, this time is from 16:30 to 20:00 Moscow time. At this time, the largest number of transactions are made.

Here is a graphic example of the TWAP algorithm (buying a large number of securities during the day with an interval of 5 minutes):

As for algorithmic trading in Russia, it is worth mentioning investment, which has been a professional participant in the stock market since 2003. Its investment strategies were included in the top 20 best market strategies according to the Barclay Managed Funds Report rating.

The main strategy - NC3816 is applied on world exchanges and is used only by qualified investors.

Another Algo Capital strategy is called “Energy”. Its profitability is published on the Moscow Exchange website. In 2022, the return was +107.22%.

Violating your Forex algorithm

To get a stable income on Forex or on another market, you must adhere to your own algorithm. Under certain circumstances or conditions, all its rules must be followed without exception.

In case of violation of his rules, the trader becomes in the habit of constantly doing this. And this is a direct path to permanent losses and possible loss of the entire deposit.

Thousands of traders in the world come to violations of trading rules. Few people notice that something is wrong in time and return to following strict rules prescribed in a balanced and calm state, without the influence of trading and financial emotions. Only strict control and compliance with the rules can help you make a profit.

If violations begin to occur systematically, trading should be stopped and analyzed.

Violation of a trading algorithm can be compared to a violation of traffic rules or industrial safety instructions. In all cases, including the stock exchange, failure to comply with the rules leads to disastrous results.

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]