Articles on the MQL5 programming and use of technical indicators

icon

Technical indicators constitute an important part of trading, and every trader tries to find something new. The authors of these articles talk about econometrics and machine learning, automatic marking of Elliott Waves and digital filters - everything from the classical methods of analysis to the modern interpretation of classical ideas.

The category features articles that will teach you how to develop a custom indicator and contains unique collections of ready-to-use mathematically explained William Blau's trading ideas.

Add a new article
latest | best
Random Walk and the Trend Indicator
Random Walk and the Trend Indicator

Random Walk and the Trend Indicator

Random Walk looks very similar to the real market data, but it has some significant features. In this article we will consider the properties of Random Walk, simulated using the coin-tossing game. To study the properties of the data, the trendiness indicator is developed.
preview
Dealing with Time (Part 1): The Basics

Dealing with Time (Part 1): The Basics

Functions and code snippets that simplify and clarify the handling of time, broker offset, and the changes to summer or winter time. Accurate timing may be a crucial element in trading. At the current hour, is the stock exchange in London or New York already open or not yet open, when does the trading time for Forex trading start and end? For a trader who trades manually and live, this is not a big problem.
Data Exchange between Indicators: It's Easy
Data Exchange between Indicators: It's Easy

Data Exchange between Indicators: It's Easy

We want to create such an environment, which would provide access to data of indicators attached to a chart, and would have the following properties: absence of data copying; minimal modification of the code of available methods, if we need to use them; MQL code is preferable (of course, we have to use DLL, but we will use just a dozen of strings of C++ code). The article describes an easy method to develop a program environment for the MetaTrader terminal, that would provide means for accessing indicator buffers from other MQL programs.
Practical Implementation of Digital Filters in MQL5 for Beginners
Practical Implementation of Digital Filters in MQL5 for Beginners

Practical Implementation of Digital Filters in MQL5 for Beginners

The idea of digital signal filtering has been widely discussed on forum topics about building trading systems. And it would be imprudent not to create a standard code of digital filters in MQL5. In this article the author describes the transformation of simple SMA indicator's code from his article "Custom Indicators in MQL5 for Newbies" into code of more complicated and universal digital filter. This article is a logical sequel to the previous article. It also tells how to replace text in code and how to correct programming errors.
The NRTR indicator and trading modules based on NRTR for the MQL5 Wizard
The NRTR indicator and trading modules based on NRTR for the MQL5 Wizard

The NRTR indicator and trading modules based on NRTR for the MQL5 Wizard

In this article we are going to analyze the NRTR indicator and create a trading system based on this indicator. We are going to develop a module of trading signals that can be used in creating strategies based on a combination of NRTR with additional trend confirmation indicators.
Learn how to design a trading system by Envelopes
Learn how to design a trading system by Envelopes

Learn how to design a trading system by Envelopes

In this article, I will share with you one of the methods of how to trade bands. This time we will consider Envelopes and will see how easy it is to create some strategies based on the Envelopes.
A New Approach to Interpreting Classic and Hidden Divergence. Part II
A New Approach to Interpreting Classic and Hidden Divergence. Part II

A New Approach to Interpreting Classic and Hidden Divergence. Part II

The article provides a critical examination of regular divergence and efficiency of various indicators. In addition, it contains filtering options for an increased analysis accuracy and features description of non-standard solutions. As a result, we will create a new tool for solving the technical task.
Time Series Forecasting Using Exponential Smoothing (continued)
Time Series Forecasting Using Exponential Smoothing (continued)

Time Series Forecasting Using Exponential Smoothing (continued)

This article seeks to upgrade the indicator created earlier on and briefly deals with a method for estimating forecast confidence intervals using bootstrapping and quantiles. As a result, we will get the forecast indicator and scripts to be used for estimation of the forecast accuracy.
Learn how to design a trading system by CCI
Learn how to design a trading system by CCI

Learn how to design a trading system by CCI

In this new article from our series for learning how to design trading systems, I will present the Commodities Channel Index (CCI), explain its specifics, and share with you how to create a trading system based on this indicator.
Rope Indicator by Erik Nayman
Rope Indicator by Erik Nayman

Rope Indicator by Erik Nayman

The article reveals how the "Rope" indicator is created based on "The Small Encyclopedia of Trader" by Erik L. Nayman. This indicator shows the direction of the trend using the calculated values of bulls and bears over a specified period of time. The article also contains principles of creating and calculating indicators along with the examples of codes. Other subjects covered include building an Expert Advisor based on the indicator, and the optimization of external parameters.
3 Methods of Indicators Acceleration by the Example of the Linear Regression
3 Methods of Indicators Acceleration by the Example of the Linear Regression

3 Methods of Indicators Acceleration by the Example of the Linear Regression

The article deals with the methods of indicators computational algorithms optimization. Everyone will find a method that suits his/her needs best. Three methods are described here.One of them is quite simple, the next one requires solid knowledge of Math and the last one requires some wit. Indicators or MetaTrader5 terminal design features are used to realize most of the described methods. The methods are quite universal and can be used not only for acceleration of the linear regression calculation, but also for many other indicators.
Multicurrency monitoring of trading signals (Part 4): Enhancing functionality and improving the signal search system
Multicurrency monitoring of trading signals (Part 4): Enhancing functionality and improving the signal search system

Multicurrency monitoring of trading signals (Part 4): Enhancing functionality and improving the signal search system

In this part, we expand the trading signal searching and editing system, as well as introduce the possibility to use custom indicators and add program localization. We have previously created a basic system for searching signals, but it was based on a small set of indicators and a simple set of search rules.
Improved candlestick pattern recognition illustrated by the example of Doji
Improved candlestick pattern recognition illustrated by the example of Doji

Improved candlestick pattern recognition illustrated by the example of Doji

How to find more candlestick patterns than usual? Behind the simplicity of candlestick patterns, there is also a serious drawback, which can be eliminated by using the significantly increased capabilities of modern trading automation tools.
Fast Testing of Trading Ideas on the Chart
Fast Testing of Trading Ideas on the Chart

Fast Testing of Trading Ideas on the Chart

The article describes the method of fast visual testing of trading ideas. The method is based on the combination of a price chart, a signal indicator and a balance calculation indicator. I would like to share my method of searching for trading ideas, as well as the method I use for fast testing of these ideas.
preview
Learn how to design a trading system by ATR

Learn how to design a trading system by ATR

In this article, we will learn a new technical tool that can be used in trading, as a continuation within the series in which we learn how to design simple trading systems. This time we will work with another popular technical indicator: Average True Range (ATR).
Studying candlestick analysis techniques (Part II): Auto search for new patterns
Studying candlestick analysis techniques (Part II): Auto search for new patterns

Studying candlestick analysis techniques (Part II): Auto search for new patterns

In the previous article, we analyzed 14 patterns selected from a large variety of existing candlestick formations. It is impossible to analyze all the patterns one by one, therefore another solution was found. The new system searches and tests new candlestick patterns based on known candlestick types.
Learn how to design a trading system by ADX
Learn how to design a trading system by ADX

Learn how to design a trading system by ADX

In this article, we will continue our series about designing a trading system using the most popular indicators and we will talk about the average directional index (ADX) indicator. We will learn this indicator in detail to understand it well and we will learn how we to use it through a simple strategy. By learning something deeply we can get more insights and we can use it better.
Multicurrency monitoring of trading signals (Part 5): Composite signals
Multicurrency monitoring of trading signals (Part 5): Composite signals

Multicurrency monitoring of trading signals (Part 5): Composite signals

In the fifth article related to the creation of a trading signal monitor, we will consider composite signals and will implement the necessary functionality. In earlier versions, we used simple signals, such as RSI, WPR and CCI, and we also introduced the possibility to use custom indicators.
Modeling time series using custom symbols according to specified distribution laws
Modeling time series using custom symbols according to specified distribution laws

Modeling time series using custom symbols according to specified distribution laws

The article provides an overview of the terminal's capabilities for creating and working with custom symbols, offers options for simulating a trading history using custom symbols, trend and various chart patterns.
preview
Manual charting and trading toolkit (Part III). Optimization and new tools

Manual charting and trading toolkit (Part III). Optimization and new tools

In this article, we will further develop the idea of drawing graphical objects on charts using keyboard shortcuts. New tools have been added to the library, including a straight line plotted through arbitrary vertices, and a set of rectangles that enable the evaluation of the reversal time and level. Also, the article shows the possibility to optimize code for improved performance. The implementation example has been rewritten, allowing the use of Shortcuts alongside other trading programs. Required code knowledge level: slightly higher than a beginner.
Learn how to design a trading system by Momentum
Learn how to design a trading system by Momentum

Learn how to design a trading system by Momentum

In my previous article, I mentioned the importance of identifying the trend which is the direction of prices. In this article I will share one of the most important concepts and indicators which is the Momentum indicator. I will share how to design a trading system based on this Momentum indicator.
MQL5 Cookbook: Development of a Multi-Symbol Indicator to Analyze Price Divergence
MQL5 Cookbook: Development of a Multi-Symbol Indicator to Analyze Price Divergence

MQL5 Cookbook: Development of a Multi-Symbol Indicator to Analyze Price Divergence

In this article, we will consider the development of a multi-symbol indicator to analyze price divergence in a specified period of time. The core topics have been already discussed in the previous article on the programming of multi-currency indicators "MQL5 Cookbook: Developing a Multi-Symbol Volatility Indicator in MQL5". So this time we will dwell only on those new features and functions that have been changed dramatically. If you are new to the programming of multi-currency indicators, I recommend you to first read the previous article.
preview
Learn how to design a trading system by Ichimoku

Learn how to design a trading system by Ichimoku

Here is a new article in our series about how to design a trading system b the most popular indicators, we will talk about the Ichimoku indicator in detail and how to design a trading system by this indicator.
preview
Learn how to design a trading system by Bear's Power

Learn how to design a trading system by Bear's Power

Welcome to a new article in our series about learning how to design a trading system by the most popular technical indicator here is a new article about learning how to design a trading system by Bear's Power technical indicator.
Analyzing charts using DeMark Sequential and Murray-Gann levels
Analyzing charts using DeMark Sequential and Murray-Gann levels

Analyzing charts using DeMark Sequential and Murray-Gann levels

Thomas DeMark Sequential is good at showing balance changes in the price movement. This is especially evident if we combine its signals with a level indicator, for example, Murray levels. The article is intended mostly for beginners and those who still cannot find their "Grail". I will also display some features of building levels that I have not seen on other forums. So, the article will probably be useful for advanced traders as well... Suggestions and reasonable criticism are welcome...
preview
Design Patterns in software development and MQL5 (Part 4): Behavioral Patterns 2

Design Patterns in software development and MQL5 (Part 4): Behavioral Patterns 2

In this article, we will complete our series about the Design Patterns topic, we mentioned that there are three types of design patterns creational, structural, and behavioral. We will complete the remaining patterns of the behavioral type which can help set the method of interaction between objects in a way that makes our code clean.
What is a trend and is the market structure based on trend or flat?
What is a trend and is the market structure based on trend or flat?

What is a trend and is the market structure based on trend or flat?

Traders often talk about trends and flats but very few of them really understand what a trend/flat really is and even fewer are able to clearly explain these concepts. Discussing these basic terms is often beset by a solid set of prejudices and misconceptions. However, if we want to make profit, we need to understand the mathematical and logical meaning of these concepts. In this article, I will take a closer look at the essence of trend and flat, as well as try to define whether the market structure is based on trend, flat or something else. I will also consider the most optimal strategies for making profit on trend and flat markets.
MQL5 Cookbook: Developing a Multi-Symbol Volatility Indicator in MQL5
MQL5 Cookbook: Developing a Multi-Symbol Volatility Indicator in MQL5

MQL5 Cookbook: Developing a Multi-Symbol Volatility Indicator in MQL5

In this article, we will consider the development of a multi-symbol volatility indicator. The development of multi-symbol indicators may present some difficulties for novice MQL5 developers which this article helps to clarify. The major issues arising in the course of development of a multi-symbol indicator have to do with the synchronization of other symbols' data with respect to the current symbol, the lack of some indicator data and the identification of the beginning of 'true' bars of a given time frame. All of these issues will be closely considered in the article.
A Few Tips for First-Time Customers
A Few Tips for First-Time Customers

A Few Tips for First-Time Customers

A proverbial wisdom often attributed to various famous people says: "He who makes no mistakes never makes anything." Unless you consider idleness itself a mistake, this statement is hard to argue with. But you can always analyze the past mistakes (your own and of others) to minimize the number of your future mistakes. We are going to attempt to review possible situations arising when executing jobs in the same-name service.
Naive Bayes classifier for signals of a set of indicators
Naive Bayes classifier for signals of a set of indicators

Naive Bayes classifier for signals of a set of indicators

The article analyzes the application of the Bayes' formula for increasing the reliability of trading systems by means of using signals from multiple independent indicators. Theoretical calculations are verified with a simple universal EA, configured to work with arbitrary indicators.
preview
Learn how to design a trading system by Alligator

Learn how to design a trading system by Alligator

In this article, we'll complete our series about how to design a trading system based on the most popular technical indicator. We'll learn how to create a trading system based on the Alligator indicator.
Learn how to design a trading system by Stochastic
Learn how to design a trading system by Stochastic

Learn how to design a trading system by Stochastic

In this article, we continue our learning series — this time we will learn how to design a trading system using one of the most popular and useful indicators, which is the Stochastic Oscillator indicator, to build a new block in our knowledge of basics.
Object-Oriented Approach to Building Multi-Timeframe and Multi-Currency Panels
Object-Oriented Approach to Building Multi-Timeframe and Multi-Currency Panels

Object-Oriented Approach to Building Multi-Timeframe and Multi-Currency Panels

This article describes how object-oriented programming can be used for creating multi-timeframe and multi-currency panels for MetaTrader 5. The main goal is to build a universal panel, which can be used for displaying many different kinds of data, such as prices, price changes, indicator values or custom buy/sell conditions without the need to modify the code of the panel itself.
preview
Exploring options for creating multicolored candlesticks

Exploring options for creating multicolored candlesticks

In this article I will address the possibilities of creating customized indicators with candlesticks, pointing out their advantages and disadvantages.
Extending Strategy Builder Functionality
Extending Strategy Builder Functionality

Extending Strategy Builder Functionality

In the previous two articles, we discussed the application of Merrill patterns to various data types. An application was developed to test the presented ideas. In this article, we will continue working with the Strategy Builder, to improve its efficiency and to implement new features and capabilities.
preview
Learn how to design a trading system by Volumes

Learn how to design a trading system by Volumes

Here is a new article from our series about learning how to design a trading system based on the most popular technical indicators. The current article will be devoted to the Volumes indicator. Volume as a concept is one of the very important factors in financial markets trading and we have to pay attention to it. Through this article, we will learn how to design a simple trading system by Volumes indicator.
preview
Multiple indicators on one chart (Part 01): Understanding the concepts

Multiple indicators on one chart (Part 01): Understanding the concepts

Today we will learn how to add multiple indicators running simultaneously on one chart, but without occupying a separate area on it. Many traders feel more confident if they monitor multiple indicators at a time (for example, RSI, STOCASTIC, MACD, ADX and some others), or in some cases even at different assets which an index is made of.
preview
Learn how to design a trading system by MFI

Learn how to design a trading system by MFI

The new article from our series about designing a trading system based on the most popular technical indicators considers a new technical indicator - the Money Flow Index (MFI). We will learn it in detail and develop a simple trading system by means of MQL5 to execute it in MetaTrader 5.
Drawing Channels - Inside and Outside View
Drawing Channels - Inside and Outside View

Drawing Channels - Inside and Outside View

I guess it won't be an exaggeration, if I say the channels are the most popular tool for the analysis of market and making trade decisions after the moving averages. Without diving deeply into the mass of trade strategies that use channels and their components, we are going to discuss the mathematical basis and the practical implementation of an indicator, which draws a channel determined by three extremums on the screen of the client terminal.
preview
Learn how to design a trading system by Fractals

Learn how to design a trading system by Fractals

This article is a new one from our series about how to design a trading system based on the most popular technical indicators. We will learn a new indicator which Fractals indicator and we will learn how to design a trading system based on it to be executed in the MetaTrader 5 terminal.