Find us on Facebook!
Join our fan page

Use new possibilities of MetaTrader 5

Programming Articles on MQL5.com

Published article "Step on New Rails: Custom Indicators in MQL5".

Step on New Rails: Custom Indicators in MQL5

I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.

Published article "Auto-Generated Documentation for MQL5 Code".

Auto-Generated Documentation for MQL5 Code

Most Java coders will be familiar with the auto-generated documentation that can be created with JavaDocs. The idea is to add comments into the code in a semi-structured way that can then be extracted into an easy to navigate help file. The C++ world also has a number of documentation auto-generators, with Microsoft's SandCastle and Doxygen being two leaders. The article describes the use of Doxygen to create HTML help file from structured comments in MQL5 code. The experiment worked very well and I believe the help documentation that Doxygen produces from MQL5 code will add a great deal of value.

There are more than 170 articles published on site

Published article "Trader's Kit: Decorating Indicators".

Trader's Kit: Decorating Indicators

In this article you will find main tasks when decorating indicators, their solution and automation.

Published article "Working with Doubles in MQL4".

Working with Doubles in MQL4

In this note we will consider a typical programming errors, that occurs while working with double numbers in MQL4 programs.

Published article "Interaction between MеtaTrader 4 and MATLAB Engine (Virtual MATLAB Machine)".

Interaction between MеtaTrader 4 and MATLAB Engine (Virtual MATLAB Machine)

The article contains considerations regarding creation of a DLL library - wrapper that will enable the interaction of MetaTrader 4 and the MATLAB mathematical desktop package. It describes "pitfalls" and ways to overcome them. The article is intended for prepared C/C++ programmers that use the Borland C++ Builder 6 compiler.

Published article "Superposition and Interference of Financial Securities".

Superposition and Interference of Financial Securities

The more factors influence the behavior of a currency pair, the more difficult it is to evaluate its behavior and make up future forecasts. Therefore, if we managed to extract components of a currency pair, values of a national currency that change with the time, we could considerably delimit the freedom of national currency movement as compared to the currency pair with this currency, as well as the number of factors influencing its behavior. As a result we would increase the accuracy of its behavior estimation and future forecasting. How can we do that?

Published article "On the Long Way to Be a Successful Trader - The Two Very First Steps".

On the Long Way to Be a Successful Trader - The Two Very First Steps

The main point of this article is to show a practical way to implement an effective MM. This can be achieved only by using a certain kind of strategies that we need to identify and describe first. In the following we’ll cover the basic concepts of how to build such a strategy and we’ll point out the common mistakes which always end up in draining a trader’s account.

Published article "Using Neural Networks In MetaTrader".

Using Neural Networks In MetaTrader

This article shows you how to easily use Neural Networks in your MQL4 code taking advantage of best freely available artificial neural network library (FANN) employing multiple neural networks in your code.

Published article "Alert and Comment for External Indicators".

Alert and Comment for External Indicators

In practical work a trader can face the following situation: it is necessary to get "alert" or a text message on a display (in a chart window) indicating about an appeared signal of an indicator. The article contains an example of displaying information about graphical objects created by an external indicator.

Published article "Channels. Advanced Models. Wolfe Waves".

Channels. Advanced Models. Wolfe Waves

The article describes rules of marking patterns of Wolfe Waves. You will find here details of constructing and rules of accurate marking, which help to find correct formations of waves quickly and correctly.

Published article "Effective Averaging Algorithms with Minimal Lag: Use in Indicators and Expert Advisors".

Effective Averaging Algorithms with Minimal Lag: Use in Indicators and Expert Advisors

The article describes custom averaging functions of higher quality developed by the author: JJMASeries(), JurXSeries(), JLiteSeries(), ParMASeries(), LRMASeries(), T3Series() and MASeries(). The author considers the hot substitution of these functions in indicators using the call of the SmoothXSeries() function.

Published article "Recipes for Neuronets".

Recipes for Neuronets

The article is intended for beginners in baking "multi-layered" cakes.

Published article "Fallacies, Part 2. Statistics Is a Pseudo-Science, or a Chronicle of Nosediving Bread And Butter".

Fallacies, Part 2. Statistics Is a Pseudo-Science, or a Chronicle of Nosediving Bread And Butter

Numerous attempts to apply statistical methods to the objective reality, i.e. to financial series, crash when met with the nonstationarity of processes, "fat tails" of accompanying probability distributions, and insufficient volume of financial data.In this publication I will try to refer not to the financial series as such, but to their subjective presentation - in this case, to the way a trader tries to halter the series, i.e. to the trading system. The eduction of statistical regularities of the trading results process is a rather enthralling task. In some cases quite true conclusions about the model of this process can be made, and these can be applied to the trading system.

Published article "Program Folder of MetaTrader 4 Client Terminal".

Program Folder of MetaTrader 4 Client Terminal

The article describes the contents of the program folder of MetaTrader 4 Client Terminal. The article will be useful for those who have already started to grasp into the details of the client terminal operation.

Published article "Visual Testing of the Profitability of Indicators and Alerts".

Visual Testing of the Profitability of Indicators and Alerts

What indicator of trading alerts or just the methods of their calculating to use is usually decided when testing EAs using these alerts. However, it is not always possible/necessary/reasonable to write an EA for each indicator. You can promptly calculate the profitability of trading on the alerts from other indicators, using a special indicator that collects their alerts itself and draws a picture of ideal trading with them. It can help you both make a visual estimate of the results obtained and quickly choose most optimal parameters.

Published article "To Sleep, or Not to Sleep?".

To Sleep, or Not to Sleep?

An alternative use of the Sleep() function in the realization of pauses between EA's actions is proposed. The approach under consideration allows a smart use of machine time.

Published article "View of Technical Analysis in the Context of Automatic Control Systems (ACS), or "Reverse View"".

View of Technical Analysis in the Context of Automatic Control Systems (ACS), or "Reverse View"

The article demonstrates an alternative view of technical analysis, which is based on the principles of both the modern automatic control theory and technical analysis itself. It is an introductory article representing the theory with some practical applications of it.

Published article "Idleness is the Stimulus to Progress. Semiautomatic Marking a Template".

Idleness is the Stimulus to Progress. Semiautomatic Marking a Template

Among the dozens of examples of how to work with charts, there is a method of manual marking a template. Trend lines, channels, support/resistance levels, etc. are imposed in a chart. Surely, there are some special programs for this kind of work. Everyone decides on his/her own which method to use. In this article, I offer you for your consideration the methods of manual marking with subsequent automating some elements of the repeated routine actions.

Published article "HTML Walkthrough Using MQL4".

HTML Walkthrough Using MQL4

HTML is nowadays one of the wide-spread types of documents. MetaTrader 4 Client Terminal allows you to save statements, test and optimization reports as .htm files. It is sometimes necessary to get information from such files in an MQL4 program. The article describes one of variations of how to get the tag structure and contents from HTML.

Published article "Expert Advisors Based on Popular Trading Strategies and Alchemy of Trading Robot Optimization (Part VI)".

Expert Advisors Based on Popular Trading Strategies and Alchemy of Trading Robot Optimization (Part VI)

In this article, the author proposes the way of improving trading systems presented in his previous articles. The article is of interest for traders already having experiences in writing Expert Advisors.

Published article "How to Write Fast Non-Redrawing ZigZags".

How to Write Fast Non-Redrawing ZigZags

A rather universal approach to writing indicators of the ZigZag type is proposed. The method includes a significant part of ZigZags already described and allows you to create new ones relatively easily.

Published article "Idleness is the Stimulus to Progress, or How to Work with Graphics Interacively".

Idleness is the Stimulus to Progress, or How to Work with Graphics Interacively

An indicator for interactive working with trend lines, Fibo levels, icons manually imposed on a chart. It allows you to draw the colored zones of Fibo levels, shows the moments of the price crossing the trend line, manages the "Price label" object.

Published article "Changing the External Parameters of MQL4 Programs without Restarting".

Changing the External Parameters of MQL4 Programs without Restarting

The article describes a method of changing the external parameters of MQL4 programs on-the-fly, without restarting.

Published article "Drawing Horizontal Break-Through Levels Using Fractals".

Drawing Horizontal Break-Through Levels Using Fractals

The article describes creation of an indicator that would display the support/resistance levels using up/down fractals.

Published article "Individual Psychology of a Trader".

Individual Psychology of a Trader

A portrait of a trader's behavior on the financial market. Author's own menu from the book "Как играть и выигрывать на бирже" ("How to speculate on stock exchange and win") by A. Elder.

Published article "Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part VII)".

Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part VII)

In this article, the author gives an example Expert Advisor meeting the requirements stated in the Rules of the Automated Trading Championship 2008

Published article "A Trader's Assistant Based on Extended MACD Analysis".

A Trader's Assistant Based on Extended MACD Analysis

Script 'Trader's Assistant' helps you to make a decision on opening positions, based on the extended analysis of the MACD status for the last three bars in the real-time trading on any timeframe. It can also be used for back testing.

Published article "Grouped File Operations".

Grouped File Operations

It is sometimes necessary to perform identical operations with a group of files. If you have a list of files included into a group, then it is no problem. However, if you need to make this list yourself, then a question arises: "How can I do this?" The article proposes doing this using functions FindFirstFile() and FindNextFile() included in kernel32.dll.

Published article "Method of Determining Errors in Code by Commenting".

Method of Determining Errors in Code by Commenting

The article describes a method of searching the errors in the MQL4 code that is based on commenting. This method is found to be a useful one in case of problems occuring during the compilation caused by the errors in a reasonably large code.

Published article "What about Hedging Daily?".

What about Hedging Daily?

A trading strategy using hedging system created for trading the intra-day style of GBPJPY / EURJPY and for daily trading.

Published article "All about Automated Trading Championship: Additional Materials of Championships 2006-2007".

All about Automated Trading Championship: Additional Materials of Championships 2006-2007

We present to you a selection of these materials that are divided into several parts. The present one contains additional materials about automated trading, Expert Advisors development, etc.

Published article "File Operations via WinAPI".

File Operations via WinAPI

Environment MQL4 is based on the conception of safe "sandbox": reading and saving files using the language are allowed in some predefined folders only. This protects the user of MetaTrader 4 from the potential danger of damaging important data on the HDD. However, it is sometimes necessary to leave that safe area. This article is devoted to the problem of how to do it easily and correctly.

Published article "All about Automated Trading Championship: Reporting the Championship 2007".

All about Automated Trading Championship: Reporting the Championship 2007

The present article contains Weekly Reports of the ATC 2007. These materials are like snapshots, they are interesting-to-read not only during the Championship, but years later as well.

Published article "Forecasting Financial Time-Series".

Forecasting Financial Time-Series

Forecasting financial time-series is a required element of any investing activity. The concept of investing itself - put up money now to gain profits in future - is based on the concept of predicting the future. Therefore, forecasting financial time-series underlies the activities of the whole investing industry - all organized exchanges and other securities trading systems.

Published article "All about Automated Trading Championship: Interviews with the Participants'07".

All about Automated Trading Championship: Interviews with the Participants'07

The published interviews of Championship 2007 bear the stamp of the results obtained during the preceding contest. The first Championship evoked a wide response on the internet and in printings. The leading developer of the MetaQuotes Software Corp. tells about changes made to the forthcoming Automated Trading Championship 2007. We put our questions to the developer of a well-known indicating complex ZUP, Eugeni Neumoin (nen) and spoke to an equity trader, Alexander Pozdnishev (AlexSilver).

Published article "All about Automated Trading Championship: Reporting the Championship 2006".

All about Automated Trading Championship: Reporting the Championship 2006

This article contains Weekly Reports of the ATC 2006. These materials are like snapshots, they are interesting-to-read not only during the Championship, but years later as well.

Published article "Trend Lines Indicator Considering T. Demark's Approach".

Trend Lines Indicator Considering T. Demark's Approach

The indicator shows trend lines displaying the recent events on the market. The indicator is developed considering the recommendations and the approach of Thomas Demark concerning technical analysis. The indicator displays both the last direction of the trend and the next-to-last opposite direction of the trend.

Published article "All about Automated Trading Championship: Interviews with the Participants'06".

All about Automated Trading Championship: Interviews with the Participants'06

Interviews with the Participants of Automated Trading Championship 2006 demonstrated a great variety of views of automated trading and trading as a whole. You can see yourselves which ideas turned out to work better during the Championship and which of them could not pass the critical verification through a three-month long "test-drive" on a contest account.

Published article "Interaction between MetaTrader 4 and Matlab via DDE".

Interaction between MetaTrader 4 and Matlab via DDE

Step-by-step instructions of how to organize data transfer from Matlab to MetaTrader 4 using DDE.

Published article "All about Automated Trading Championship: Statistical Reports".

All about Automated Trading Championship: Statistical Reports

Creating a profitable and stable trading system is always related to statistical data processing. In this article, we pout together statistical reports of the Automated Trading Championships 2006-2007. It may well be that the information they provide will help you find new trading ideas or correct the existing ones. Analyze the data and save your time.

Published article "All about Automated Trading Championship: Registration".

All about Automated Trading Championship: Registration

This article comprises useful materials that will help you learn more about the procedure of registration for participation in the Automated Trading Championship.

Published article "Trend-Hunting".

Trend-Hunting

The article describes an algorithm of volume increase of a profit trade. Its implementation using MQL4 means is presented in the article.

Published article "Layman's Notes: ZigZag…".

Layman's Notes: ZigZag…

Surely, a fey thought to trade closely to extremums visited every apprentice trader when he/she saw "enigmatic" polyline for the first time. It's so simple, indeed. Here is the maximum. And there is the minimum. A beautiful picture on the history. And what is in practice? A ray is drawn. It should seem, that is it, the peak! It is time to sell. And now we go down. But hell no! The price is treacherously moving upwards. Haw! It's a trifle, not an indicator. And you throw it out!

Published article "The Statistic Analysis of Market Movements and Their Prognoses".

The Statistic Analysis of Market Movements and Their Prognoses

The present article contemplates the wide opportunities of the statistic approach to marketing. Unfortunately, beginner traders deliberately fail to apply the really mighty science of statistics. Meanwhile, it is the only thing they use subconsciously while analyzing the market. Besides, statistics can give answers to many questions.

Published article "Market Diagnostics by Pulse".

Market Diagnostics by Pulse

In the article, an attempt is made to visualize the intensity of specific markets and of their time segments, to detect their regularities and behavior patterns.

Published article "Automated Trading Championship: The Reverse of the Medal".

Automated Trading Championship: The Reverse of the Medal

Automated Trading Championship based on online trading platform MetaTrader 4 is being conducted for the third time and accepted by many people as a matter-of-course yearly event being waited for with impatience. However, this competition specifies strict requirements to the Participants. This is precisely the topic we're going to discuss in this article.

Published article "Two-Stage Modification of Opened Positions".

Two-Stage Modification of Opened Positions

The two-stage approach allows you to avoid the unnecessary closing and re-opening of positions in situations close to the trend and in cases of possible occurrence of divirgence.

Published article "A Pattern Trailing Stop and Exit the Market".

A Pattern Trailing Stop and Exit the Market

Developers of order modification/closing algorithms suffer from an imperishable woe - how to compare results obtained by different methods? The mechanism of checking is well known - it is Strategy Tester. But how to make an EA to work equally for opening/closing orders? The article describes a tool that provides strong repetition of order openings that allows us to maintain a mathematically correct platform to compare the results of different algorithms for trailing stops and for exiting the market.

Published article "How to Become a Participant of Automated Trading Championship 2008?".

How to Become a Participant of Automated Trading Championship 2008?

The main purpose of the Championship is to popularize automated trading and accumulate practical information in this field of knowledge. As the Organizer of the Championship, we are doing our best to provide a fair competition and suppress all attempts to “play booty”. It is this reasoning that sets the strict Rules of the Championship.

1...4849505152535455565758