Articles on data analysis and statistics in MQL5

icon

Articles on mathematical models and laws of probability are interesting for many traders. Mathematics is the basis of technical indicators, and statistics is required to analyze trading results and develop strategies.

Read about the fuzzy logic, digital filters, market profile, Kohonen maps, neural gas and many other tools that can be used for trading.

Add a new article
latest | best
MQL5 Programming Basics: Lists
MQL5 Programming Basics: Lists

MQL5 Programming Basics: Lists

The new version of the programming language for trading strategy development, MQL [MQL5], provides more powerful and effective features as compared with the previous version [MQL4]. The advantage essentially lies in the object-oriented programming features. This article looks into the possibility of using complex custom data types, such as nodes and lists. It also provides an example of using lists in practical programming in MQL5.
Creating a Multi-Currency Multi-System Expert Advisor
Creating a Multi-Currency Multi-System Expert Advisor

Creating a Multi-Currency Multi-System Expert Advisor

The article introduces a structure for an Expert Advisor that trades multiple symbols and uses several trading systems simultaneously. If you already identified the optimal input parameters for all your EAs and got good backtesting results for each of them separately, ask yourself what results you would get if testing all EAs simultaneously, with all your strategies put together.
Marvel Your MQL5 Customers with a Usable Cocktail of Technologies!
Marvel Your MQL5 Customers with a Usable Cocktail of Technologies!

Marvel Your MQL5 Customers with a Usable Cocktail of Technologies!

MQL5 provides programmers with a very complete set of functions and object-oriented API thanks to which they can do everything they want within the MetaTrader environment. However, Web Technology is an extremely versatile tool nowadays that may come to the rescue in some situations when you need to do something very specific, want to marvel your customers with something different or simply you do not have enough time to master a specific part of MT5 Standard Library. Today's exercise walks you through a practical example about how you can manage your development time at the same time as you also create an amazing tech cocktail.
MQL5 Cookbook: Saving Optimization Results of an Expert Advisor Based on Specified Criteria
MQL5 Cookbook: Saving Optimization Results of an Expert Advisor Based on Specified Criteria

MQL5 Cookbook: Saving Optimization Results of an Expert Advisor Based on Specified Criteria

We continue the series of articles on MQL5 programming. This time we will see how to get results of each optimization pass right during the Expert Advisor parameter optimization. The implementation will be done so as to ensure that if the conditions specified in the external parameters are met, the corresponding pass values will be written to a file. In addition to test values, we will also save the parameters that brought about such results.
MetaTrader AppStore Results for Q3 2013
MetaTrader AppStore Results for Q3 2013

MetaTrader AppStore Results for Q3 2013

Another quarter of the year has passed and we have decided to sum up its results for MetaTrader AppStore - the largest store of trading robots and technical indicators for MetaTrader platforms. More than 500 developers have placed over 1 200 products in the Market by the end of the reported quarter.
MQL5 Market Results for Q2 2013
MQL5 Market Results for Q2 2013

MQL5 Market Results for Q2 2013

Successfully operating for 1.5 years, MQL5 Market has become the largest traders' store of trading strategies and technical indicators. It offers around 800 trading applications provided by 350 developers from around the world. Over 100.000 trading programs have already been purchased and downloaded by traders to their MetaTrader 5 terminals.
MQL5 Market Results for Q1 2013
MQL5 Market Results for Q1 2013

MQL5 Market Results for Q1 2013

Since its founding, the store of trading robots and technical indicators MQL5 Market has already attracted more than 250 developers who have published 580 products. The first quarter of 2013 has turned out to be quite successful for some MQL5 Market sellers who have managed to make handsome profit by selling their products.
Jeremy Scott - Successful MQL5 Market Seller
Jeremy Scott - Successful MQL5 Market Seller

Jeremy Scott - Successful MQL5 Market Seller

Jeremy Scott who is better known under Johnnypasado nickname at MQL5.community became famous offering products in our MQL5 Market service. Jeremy has already made several thousands of dollars in the Market and that is not the limit. We decided to take a closer look at the future millionaire and receive some pieces of advice for MQL5 Market sellers.
Calculation of Integral Characteristics of Indicator Emissions
Calculation of Integral Characteristics of Indicator Emissions

Calculation of Integral Characteristics of Indicator Emissions

Indicator emissions are a little-studied area of market research. Primarily, this is due to the difficulty of analysis that is caused by the processing of very large arrays of time-varying data. Existing graphical analysis is too resource intensive and has therefore triggered the development of a parsimonious algorithm that uses time series of emissions. This article demonstrates how visual (intuitive image) analysis can be replaced with the study of integral characteristics of emissions. It can be of interest to both traders and developers of automated trading systems.
MQL5 Market Turns One Year Old
MQL5 Market Turns One Year Old

MQL5 Market Turns One Year Old

One year has passed since the launch of sales in MQL5 Market. It was a year of hard work, which turned the new service into the largest store of trading robots and technical indicators for MetaTrader 5 platform.
MetaTrader 4 and MetaTrader 5 Trading Signals Widgets
MetaTrader 4 and MetaTrader 5 Trading Signals Widgets

MetaTrader 4 and MetaTrader 5 Trading Signals Widgets

Recently MetaTrader 4 and MetaTrader 5 user received an opportunity to become a Signals Provider and earn additional profit. Now, you can display your trading success on your web site, blog or social network page using the new widgets. The benefits of using widgets are obvious: they increase the Signals Providers' popularity, establish their reputation as successful traders, as well as attract new Subscribers. All traders placing widgets on other web sites can enjoy these benefits.
Statistical Carry Trade Strategy
Statistical Carry Trade Strategy

Statistical Carry Trade Strategy

An algorithm of statistical protection of open positive swap positions from unwanted price movements. This article features a variant of the carry trade protection strategy that allows to compensate for potential risk of the price movement in the direction opposite to that of the open position.
Fundamentals of Statistics
Fundamentals of Statistics

Fundamentals of Statistics

Every trader works using certain statistical calculations, even if being a supporter of fundamental analysis. This article walks you through the fundamentals of statistics, its basic elements and shows the importance of statistics in decision making.
Application of the Eigen-Coordinates Method to Structural Analysis of Nonextensive Statistical Distributions
Application of the Eigen-Coordinates Method to Structural Analysis of Nonextensive Statistical Distributions

Application of the Eigen-Coordinates Method to Structural Analysis of Nonextensive Statistical Distributions

The major problem of applied statistics is the problem of accepting statistical hypotheses. It was long considered impossible to be solved. The situation has changed with the emergence of the eigen-coordinates method. It is a fine and powerful tool for a structural study of a signal allowing to see more than what is possible using methods of modern applied statistics. The article focuses on practical use of this method and sets forth programs in MQL5. It also deals with the problem of function identification using as an example the distribution introduced by Hilhorst and Schehr.
Introduction to the Empirical Mode Decomposition Method
Introduction to the Empirical Mode Decomposition Method

Introduction to the Empirical Mode Decomposition Method

This article serves to familiarize the reader with the empirical mode decomposition (EMD) method. It is the fundamental part of the Hilbert–Huang transform and is intended for analyzing data from nonstationary and nonlinear processes. This article also features a possible software implementation of this method along with a brief consideration of its peculiarities and gives some simple examples of its use.
Limitless Opportunities with MetaTrader 5 and MQL5
Limitless Opportunities with MetaTrader 5 and MQL5

Limitless Opportunities with MetaTrader 5 and MQL5

In this article, I would like to give an example of what a trader's program can be like as well as what results can be achieved in 9 months, having started to learn MQL5 from scratch. This example will also show how multi-functional and informative such a program can be for a trader while taking minimum space on the price chart. And we will be able to see just how colorful, bright and intuitively clear to the user trade information panels can get. As well as many other features...
Kernel Density Estimation of the Unknown Probability Density Function
Kernel Density Estimation of the Unknown Probability Density Function

Kernel Density Estimation of the Unknown Probability Density Function

The article deals with the creation of a program allowing to estimate the kernel density of the unknown probability density function. Kernel Density Estimation method has been chosen for executing the task. The article contains source codes of the method software implementation, examples of its use and illustrations.
The Simple Example of Creating an Indicator Using Fuzzy Logic
The Simple Example of Creating an Indicator Using Fuzzy Logic

The Simple Example of Creating an Indicator Using Fuzzy Logic

The article is devoted to the practical application of the fuzzy logic concept for financial markets analysis. We propose the example of the indicator generating signals based on two fuzzy rules based on Envelopes indicator. The developed indicator uses several indicator buffers: 7 buffers for calculations, 5 buffers for the charts display and 2 color buffers.
Who Is Who in MQL5.community?
Who Is Who in MQL5.community?

Who Is Who in MQL5.community?

The MQL5.com website remembers all of you quite well! How many of your threads are epic, how popular your articles are and how often your programs in the Code Base are downloaded – this is only a small part of what is remembered at MQL5.com. Your achievements are available in your profile, but what about the overall picture? In this article we will show the general picture of all MQL5.community members achievements.
Analyzing the Indicators Statistical Parameters
Analyzing the Indicators Statistical Parameters

Analyzing the Indicators Statistical Parameters

The technical analysis widely implements the indicators showing the basic quotes "more clearly" and allowing traders to perform analysis and forecast market prices movement. It's quite obvious that there is no sense in using the indicators, let alone applying them in creation of trading systems, unless we can solve the issues concerning initial quotes transformation and the obtained result credibility. In this article we show that there are serious reasons for such a conclusion.
The Box-Cox Transformation
The Box-Cox Transformation

The Box-Cox Transformation

The article is intended to get its readers acquainted with the Box-Cox transformation. The issues concerning its usage are addressed and some examples are given allowing to evaluate the transformation efficiency with random sequences and real quotes.
Multiple Regression Analysis. Strategy Generator and Tester in One
Multiple Regression Analysis. Strategy Generator and Tester in One

Multiple Regression Analysis. Strategy Generator and Tester in One

The article gives a description of ways of use of the multiple regression analysis for development of trading systems. It demonstrates the use of the regression analysis for strategy search automation. A regression equation generated and integrated in an EA without requiring high proficiency in programming is given as an example.
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.
Using Discriminant Analysis to Develop Trading Systems
Using Discriminant Analysis to Develop Trading Systems

Using Discriminant Analysis to Develop Trading Systems

When developing a trading system, there usually arises a problem of selecting the best combination of indicators and their signals. Discriminant analysis is one of the methods to find such combinations. The article gives an example of developing an EA for market data collection and illustrates the use of the discriminant analysis for building prognostic models for the FOREX market in Statistica software.
Time Series Forecasting Using Exponential Smoothing
Time Series Forecasting Using Exponential Smoothing

Time Series Forecasting Using Exponential Smoothing

The article familiarizes the reader with exponential smoothing models used for short-term forecasting of time series. In addition, it touches upon the issues related to optimization and estimation of the forecast results and provides a few examples of scripts and indicators. This article will be useful as a first acquaintance with principles of forecasting on the basis of exponential smoothing models.
Analysis of the Main Characteristics of Time Series
Analysis of the Main Characteristics of Time Series

Analysis of the Main Characteristics of Time Series

This article introduces a class designed to give a quick preliminary estimate of characteristics of various time series. As this takes place, statistical parameters and autocorrelation function are estimated, a spectral estimation of time series is carried out and a histogram is built.
Universal Regression Model for Market Price Prediction
Universal Regression Model for Market Price Prediction

Universal Regression Model for Market Price Prediction

The market price is formed out of a stable balance between demand and supply which, in turn, depend on a variety of economic, political and psychological factors. Differences in nature as well as causes of influence of these factors make it difficult to directly consider all the components. This article sets forth an attempt to predict the market price on the basis of an elaborated regression model.
The Role of Statistical Distributions in Trader's Work
The Role of Statistical Distributions in Trader's Work

The Role of Statistical Distributions in Trader's Work

This article is a logical continuation of my article Statistical Probability Distributions in MQL5 which set forth the classes for working with some theoretical statistical distributions. Now that we have a theoretical base, I suggest that we should directly proceed to real data sets and try to make some informational use of this base.
MQL5-RPC. Remote Procedure Calls from MQL5: Web Service Access and XML-RPC ATC Analyzer for Fun and Profit
MQL5-RPC. Remote Procedure Calls from MQL5: Web Service Access and XML-RPC ATC Analyzer for Fun and Profit

MQL5-RPC. Remote Procedure Calls from MQL5: Web Service Access and XML-RPC ATC Analyzer for Fun and Profit

This article describes MQL5-RPC framework that enables Remote Procedure Calls from MQL5. It starts with XML-RPC basics, MQL5 implementation and follows with two real usage examples. First example is using external web service and the second one is a client to simple XML-RPC ATC 2011 Analyzer service. If you are interested on how to implement and analyze different statistics from ATC 2011 in real time, this article is just for you.
Statistical Probability Distributions in MQL5
Statistical Probability Distributions in MQL5

Statistical Probability Distributions in MQL5

The article addresses probability distributions (normal, log-normal, binomial, logistic, exponential, Cauchy distribution, Student's t-distribution, Laplace distribution, Poisson distribution, Hyperbolic Secant distribution, Beta and Gamma distribution) of random variables used in Applied Statistics. It also features classes for handling these distributions.
Creating Custom Criteria of Optimization of Expert Advisors
Creating Custom Criteria of Optimization of Expert Advisors

Creating Custom Criteria of Optimization of Expert Advisors

The MetaTrader 5 Client Terminal offers a wide range of opportunities for optimization of Expert Advisor parameters. In addition to the optimization criteria included in the strategy tester, developers are given the opportunity of creating their own criteria. This leads to an almost limitless number of possibilities of testing and optimizing of Expert Advisors. The article describes practical ways of creating such criteria - both complex and simple ones.
Applying The Fisher Transform and Inverse Fisher Transform to Markets Analysis in MetaTrader 5
Applying The Fisher Transform and Inverse Fisher Transform to Markets Analysis in MetaTrader 5

Applying The Fisher Transform and Inverse Fisher Transform to Markets Analysis in MetaTrader 5

We now know that probability density function (PDF) of a market cycle does not remind a Gaussian but rather a PDF of a sine wave and most of the indicators assume that the market cycle PDF is Gaussian we need a way to "correct" that. The solution is to use Fisher Transform. The Fisher transform changes PDF of any waveform to approximately Gaussian. This article describes the mathematics behind the Fisher Transform and the Inverse Fisher Transform and their application to trading. A proprietary trading signal module based on the Inverse Fisher Transform is presented and evaluated.
Using Self-Organizing Feature Maps (Kohonen Maps) in MetaTrader 5
Using Self-Organizing Feature Maps (Kohonen Maps) in MetaTrader 5

Using Self-Organizing Feature Maps (Kohonen Maps) in MetaTrader 5

One of the most interesting aspects of Self-Organizing Feature Maps (Kohonen maps) is that they learn to classify data without supervision. In its basic form it produces a similarity map of input data (clustering). The SOM maps can be used for classification and visualizing of high-dimensional data. In this article we will consider several simple applications of Kohonen maps.
Statistical Estimations
Statistical Estimations

Statistical Estimations

Estimation of statistical parameters of a sequence is very important, since most of mathematical models and methods are based on different assumptions. For example, normality of distribution law or dispersion value, or other parameters. Thus, when analyzing and forecasting of time series we need a simple and convenient tool that allows quickly and clearly estimating the main statistical parameters. The article shortly describes the simplest statistical parameters of a random sequence and several methods of its visual analysis. It offers the implementation of these methods in MQL5 and the methods of visualization of the result of calculations using the Gnuplot application.
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.
Econometric Approach to Analysis of Charts
Econometric Approach to Analysis of Charts

Econometric Approach to Analysis of Charts

This article describes the econometric methods of analysis, the autocorrelation analysis and the analysis of conditional variance in particular. What is the benefit of the approach described here? Use of the non-linear GARCH models allows representing the analyzed series formally from the mathematical point of view and creating a forecast for a specified number of steps.
Filtering Signals Based on Statistical Data of Price Correlation
Filtering Signals Based on Statistical Data of Price Correlation

Filtering Signals Based on Statistical Data of Price Correlation

Is there any correlation between the past price behavior and its future trends? Why does the price repeat today the character of its previous day movement? Can the statistics be used to forecast the price dynamics? There is an answer, and it is positive. If you have any doubt, then this article is for you. I'll tell how to create a working filter for a trading system in MQL5, revealing an interesting pattern in price changes.
Building a Spectrum Analyzer
Building a Spectrum Analyzer

Building a Spectrum Analyzer

This article is intended to get its readers acquainted with a possible variant of using graphical objects of the MQL5 language. It analyses an indicator, which implements a panel of managing a simple spectrum analyzer using the graphical objects. The article is meant for readers acquianted with basics of MQL5.
Moving Mini-Max: a New Indicator for Technical Analysis and Its Implementation in MQL5
Moving Mini-Max: a New Indicator for Technical Analysis and Its Implementation in MQL5

Moving Mini-Max: a New Indicator for Technical Analysis and Its Implementation in MQL5

In the following article I am describing a process of implementing Moving Mini-Max indicator based on a paper by Z.G.Silagadze 'Moving Mini-max: a new indicator for technical analysis'. The idea of the indicator is based on simulation of quantum tunneling phenomena, proposed by G. Gamov in the theory of alpha decay.
Growing Neural Gas: Implementation in MQL5
Growing Neural Gas: Implementation in MQL5

Growing Neural Gas: Implementation in MQL5

The article shows an example of how to develop an MQL5-program implementing the adaptive algorithm of clustering called Growing neural gas (GNG). The article is intended for the users who have studied the language documentation and have certain programming skills and basic knowledge in the area of neuroinformatics.