Algorithmic Trading Signals Tutorial

Algorithmic trading or Algo trading or Black box trading refers to the process of trading the global financial markets using computer algorithms

 

What is Algorithmic Trading?

Algorithmic trading, also known as algo trading or black-box trading, refers to the practice of trading global financial markets using computer algorithms that follow a defined set of rules and instructions. These algorithms analyze supply and demand and place trades without human intervention.

 

Quantitative Analysis

Quantitative analysis employs a wide range of data to develop trading models and strategies capable of generating trading signals. These forecasting models incorporate both fundamental and statistical data (e.g., mean reversion). Before being applied to strategy development, such models must undergo extensive back-testing using historical data.


 

The Algorithmic Approach

Algorithmic trading involves a series of instructions with parameters such as time, price, and quantity. It commonly utilizes techniques from classical financial mathematics (e.g., asset pricing theory).


 

Basic Assumptions of Algorithmic Trading

Some fundamental assumptions in quantitative finance include:

(i) Historical results have at least some predictive value [Sharpe 1994]

(ii) Financial markets are not perfectly efficient in the short term

(iii) Financial markets have finite depth

(iv) Regularities in financial data exist, but only for brief periods—a window of opportunity may open and later close

(v) Financial data (price and quantity) are influenced by human psychology and societal factors, making them inherently random and unstable


 

Components of an Algorithmic Signaling Machine

 

An algorithmic system comprises two primary components:

  • The Forecasting Module

This module analyzes market dynamics, particularly potential changes in supply and demand conditions.

  • The Action Module

This module suggests and/or executes specific trading actions at defined prices and times (e.g., opening, modifying, or closing a series of trading orders).

 

Common Modules for Creating Forecasting Indicators:

  • Intermarket Correlations: Analyzing correlations between different markets

  • Volume Clustering: Significant changes in trading volume may indicate upcoming price movements

  • Imbalances of Demand/Supply: Shifts in order volume on one side may predict future price changes

  • Asset Pricing Inefficiencies: Comparing asset prices with related variables (e.g., sectoral indexes for equities)

  • News Effect: Market reactions to news may form predictable patterns

 

Tools for Creating and Evaluating Algorithmic Trading Signals:

  • Pattern Recognition (machine learning)

  • Order/Volume Breakout Analysis

  • Time Series Analysis

  • Intermarket Correlation Analysis

  • Market Sentiment Measures: Data mining of positive/negative language used in relation to specific entities or events

  • Historical Back-Testing

  • Monte Carlo Simulation: Applying random sampling to solve deterministic problems

  • Hamilton–Jacobi–Bellman (HJB) Equation: A core element in optimal control theory

  • Queuing Theory: Mathematical modeling of waiting lines to predict timing and queue lengths

  • Sharpe/Sortino Ratios: Metrics that distinguish harmful volatility from total volatility by focusing on downside deviation (i.e., the standard deviation of negative returns)


 

Algorithmic Strategies

There are dozens of different algorithmic trading strategies. Multiple strategies can also be combined to build a multi-strategy trading system.

 

(1) Trend-Following Algorithmic Strategies

This is the most popular algorithmic trading approach. It involves following strong price trends using:

(i) Historical support and resistance

(ii) Price channel breakouts

(iii) Technical analysis indicators

(iv) Moving averages (e.g., 50-day and 200-day moving averages)

A trend-following strategy may use historical data to evaluate the formation of a new trend.

 

(2) Mean-Reversion Algorithmic Strategies

The mean-reversion strategy assumes that the price of a financial asset reverts to its mean approximately 80% of the time. In other words, markets are ranging 80% of the time. This implies that extreme highs and lows offer opportunities to sell or buy, anticipating a return to the mean. The strategy utilizes:

(i) Historical data to calculate an average asset price

(ii) The current price range (a breakout from this range triggers a long/short trade)

 

(3) News-Based Algorithmic Strategies

Algorithmic trading is particularly effective in trading around news events. These strategies generate and execute signals based on the difference between actual economic data and market expectations.

 

(4) Market Sentiment Algorithmic Strategies

Market sentiment strategies may draw from various data sources, including:

(i) COT (Commitment of Traders) report (CBOE)

(ii) Put/Call ratio

(iii) Social media metrics (via data mining)

(iv) Online trading sentiment measures

There are numerous other algorithmic trading strategies, such as arbitrage strategies, statistical arbitrage, Volume Weighted Average Price (VWAP), Time Weighted Average Price (TWAP), and mathematical model-based strategies, among others.


 

StrategyQuant for Algorithmic Traders

StrategyQuant Algorithmic Platform –Build Complex Algorithmic Strategies

 

StrategyQuant is a state-of-the-art platform for building and testing automated trading strategies. It is accessible to all traders, even those without programming skills. What sets the platform apart is its ability to evaluate hundreds of strategies simultaneously by fully randomizing market conditions.

StrategyQuant Main Features

The platform can generate algorithmic strategies for trading FX currencies, stocks, indices, ETFs, and more.

StrategyQuant offers two main options:

(a) Build your own automated strategy from scratch
(b) Find and modify a ready-to-use automated trading strategy

The finalized strategy can be exported for use on various platforms, including:

(1) MetaTrader 4 | (2) NinjaTrader | (3) TradeStation

 

► StrategyQuant Platform's Website | ► Full Review on ExpertSignal


 

Programming Languages for Building Algorithmic Trading Systems

The following are the most commonly used programming languages for developing algorithmic trading strategies:

 

  • Microsoft Visual C++/C# (Ideal for Maximizing Speed of Order Execution)

C++ is widely used in high-frequency trading (HFT). It offers advantages such as high execution speed, advanced debugging tools, efficient handling of large data volumes, code completion (IntelliSense), and streamlined project management.

  • Python (Open Source – Ideal for Back-Testing and Research)

Python is a high-level programming language commonly used in algorithmic trading. Its key advantages include powerful libraries, advanced back-testing capabilities, and a user-friendly interface.

https://www.python.org/

  • MatLab (Mathematical Language)

MatLab is designed for complex algebraic operations and is also widely used for researching historical financial data.

  • R Language (Free Statistical Language)

R is a statistical programming language capable of building trade signaling systems.

https://www.r-project.org/

  • Java (Free Programming Language)

Java is a programming language commonly used for low-latency data processing, modeling, and trade simulations.

  • MQL (Free Coding Language for MetaTrader Platforms)

MQL is a built-in coding language available on all MetaTrader platforms. It is very user-friendly, with a simple editor and compiler. However, it does have certain limitations.


MetaTrader 4 (MT4) is the Forex industry’s standard electronic trading platform

 

Creating a Simple Algorithmic Trade System on MetaTrader 4

 

MetaTrader 4 (MT4) is the standard electronic trading platform in the Forex industry. It is free to use and includes the MQL4 language for programming indicators and Expert Advisors (EAs). Depending on your Forex broker, MT4 can trade a wide range of financial instruments, including bonds, equities, commodities, and cryptocurrencies.

Creating Automated Systems Using EA Builder Software

For users without programming experience, online tools like EA Builder offer a user-friendly interface for transforming trading ideas into fully automated systems.

EA Builder Features (for MT4, MT5, or TradeStation):

  • Free for creating indicators; $97 one-time payment for building automated systems

  • Full set of built-in functions (including features like trendlines and time filters)

  • Includes comprehensive money management modules

  • Outputs a single compiled MQL4/MQL5 file, ready for trading

 

» EA Builder for MT4 and MT5


 

□ G. Protonotarios, financial analyst

for ExpertSignal.com (c)

(February 2018)

 

 

Sources:

(1) Algorithmic Trading Quantitative Research

Michael G. Sotiropoulos

Bank of America Merrill Lynch, Princeton Quant Trading Conference, 31-Mar-2012

(2) Automated Finance: The Assumptions and Behavioral Aspects of Algorithmic Trading

Andrew Kumiega Illinois Institute of Technology, Ben Van Vliet Illinois Institute of Technology

(3) Recorded Future Blog

www.recordedfuture.com

White Paper - News Analytics for Quantitative Trading Strategies

(4) Wikipedia –The Free Encyclopedia

www.Wikipedia.org

(5) MetaQuotes MetaTrader4

www.MetaTrader4.com

Pin It