![MQL for "Dummies": How to Design and Construct Object Classes](https://c.mql5.com/2/0/cube__1.png)
![MQL for "Dummies": How to Design and Construct Object Classes](https://c.mql5.com/i/articles/overlay.png)
MQL for "Dummies": How to Design and Construct Object Classes
By creating a sample program of visual design, we demonstrate how to design and construct classes in MQL5. The article is written for beginner programmers, who are working on MT5 applications. We propose a simple and easy grasping technology for creating classes, without the need to deeply immerse into the theory of object-oriented programming.
![Creating Active Control Panels in MQL5 for Trading](https://c.mql5.com/2/0/panel__2.png)
![Creating Active Control Panels in MQL5 for Trading](https://c.mql5.com/i/articles/overlay.png)
Creating Active Control Panels in MQL5 for Trading
The article covers the problem of development of active control panels in MQL5. Interface elements are managed by the event handling mechanism. Besides, the option of a flexible setup of control elements properties is available. The active control panel allows working with positions, as well setting, modifying and deleting market and pending orders.
![Practical Application Of Databases For Markets Analysis](https://c.mql5.com/2/0/dar.png)
![Practical Application Of Databases For Markets Analysis](https://c.mql5.com/i/articles/overlay.png)
Practical Application Of Databases For Markets Analysis
Working with data has become the main task for modern software - both for standalone and network applications. To solve this problem a specialized software were created. These are Database Management Systems (DBMS), that can structure, systematize and organize data for their computer storage and processing. As for trading, the most of analysts don't use databases in their work. But there are tasks, where such a solution would have to be handy. This article provides an example of indicators, that can save and load data from databases both with client-server and file-server architectures.
![Migrating from MQL4 to MQL5](https://c.mql5.com/2/0/logo__4.png)
![Migrating from MQL4 to MQL5](https://c.mql5.com/i/articles/overlay.png)
Migrating from MQL4 to MQL5
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
![A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment](https://c.mql5.com/2/0/virtual__1.png)
![A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment](https://c.mql5.com/i/articles/overlay.png)
A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment
This class library can be added to an MetaTrader 5 Expert Advisor to enable it to be written with an order-centric approach broadly similar to MetaTrader 4, in comparison to the position-based approach of MetaTrader 5. It does this by keeping track of virtual orders at the MetaTrader 5 client terminal, while maintaining a protective broker stop for each position for disaster protection.
![Creating an Indicator with Graphical Control Options](https://c.mql5.com/2/0/macd__1.png)
![Creating an Indicator with Graphical Control Options](https://c.mql5.com/i/articles/overlay.png)
Creating an Indicator with Graphical Control Options
Those who are familiar with market sentiments, know the MACD indicator (its full name is Moving Average Convergence/Divergence) - the powerful tool for analyzing the price movement, used by traders from the very first moments of appearance of the computer analysis methods. In this article we'll consider possible modifications of MACD and implement them in one indicator with the possibility to graphically switch between the modifications.
![MetaTrader 5: Publishing trading forecasts and live trading statements via e-mail on blogs, social networks and dedicated websites](https://c.mql5.com/2/0/social-network.png)
![MetaTrader 5: Publishing trading forecasts and live trading statements via e-mail on blogs, social networks and dedicated websites](https://c.mql5.com/i/articles/overlay.png)
MetaTrader 5: Publishing trading forecasts and live trading statements via e-mail on blogs, social networks and dedicated websites
This article aims to present ready-made solutions for publishing forecasts using MetaTrader 5. It covers a range of ideas: from using dedicated websites for publishing MetaTrader statements, through setting up one's own website with virtually no web programming experience needed and finally integration with a social network microblogging service that allows many readers to join and follow the forecasts. All solutions presented here are 100% free and possible to setup by anyone with a basic knowledge of e-mail and ftp services. There are no obstacles to use the same techniques for professional hosting and commercial trading forecast services.
![Creating a "Snake" Game in MQL5](https://c.mql5.com/2/0/snake__2.png)
![Creating a "Snake" Game in MQL5](https://c.mql5.com/i/articles/overlay.png)
Creating a "Snake" Game in MQL5
This article describes an example of "Snake" game programming. In MQL5, the game programming became possible primarily due to event handling features. The object-oriented programming greatly simplifies this process. In this article, you will learn the event processing features, the examples of use of the Standard MQL5 Library classes and details of periodic function calls.
![Creating Tick Indicators in MQL5](https://c.mql5.com/2/0/Untitled7.png)
![Creating Tick Indicators in MQL5](https://c.mql5.com/i/articles/overlay.png)
Creating Tick Indicators in MQL5
In this article, we will consider the creation of two indicators: the tick indicator, which plots the tick chart of the price and tick candle indicator, which plot candles with the specified number of ticks. Each of the indicators writes the incoming prices into a file, and uses the saved data after the restart of the indicator (these data also can be used by the other programs)
![Using the Object Pointers in MQL5](https://c.mql5.com/2/0/pointer_small.png)
![Using the Object Pointers in MQL5](https://c.mql5.com/i/articles/overlay.png)
Using the Object Pointers in MQL5
By default, all objects in MQL5 are passed by reference, but there is a possibility to use the object pointers. However it's necessary to perform the pointer checking, because the object may be not initialized. In this case, the MQL5 program will be terminated with critical error and unloaded. The objects, created automatically, doesn't cause such an error, so in this sence, they are quite safe. In this article, we will try to understand the difference between the object reference and object pointer, and consider how to write secure code, that uses the pointers.
![MQL5: Analysis and Processing of Commodity Futures Trading Commission (CFTC) Reports in MetaTrader 5](https://c.mql5.com/2/0/trader_mql5__1.png)
![MQL5: Analysis and Processing of Commodity Futures Trading Commission (CFTC) Reports in MetaTrader 5](https://c.mql5.com/i/articles/overlay.png)
MQL5: Analysis and Processing of Commodity Futures Trading Commission (CFTC) Reports in MetaTrader 5
In this article, we will develop a tool for CFTC report analysis. We will solve the following problem: to develop an indicator, that allows using the CFTC report data directly from the data files provided by Commission without an intermediate processing and conversion. Further, it can be used for the different purposes: to plot the data as an indicator, to proceed with the data in the other indicators, in the scripts for the automated analysis, in the Expert Advisors for the use in the trading strategies.
![Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator](https://c.mql5.com/2/0/a03__1.png)
![Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator](https://c.mql5.com/i/articles/overlay.png)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator
MetaQuotes Programming Language 5 (MQL5), included in MetaTrader 5 Client Terminal, has many new possibilities and higher performance, compared to MQL4. This article will help you to get acquainted with this new programming language. The simple examples of how to write an Expert Advisor and Custom Indicator are presented in this article. We will also consider some details of MQL5 language, that are necessary to understand these examples.
![Drawing Indicator's Emissions in MQL5](https://c.mql5.com/2/0/avataar__1.png)
![Drawing Indicator's Emissions in MQL5](https://c.mql5.com/i/articles/overlay.png)
Drawing Indicator's Emissions in MQL5
In this article, we will consider the emission of indicators - a new approach to the market research. The calculation of emission is based on the intersection of different indicators: more and more points with different colors and shapes appear after each tick. They form numerous clusters like nebulae, clouds, tracks, lines, arcs, etc. These shapes help to detect the invisible springs and forces that affect the movement of market prices.
![The Drawing Styles in MQL5](https://c.mql5.com/2/0/180x180LoongIndicator.png)
![The Drawing Styles in MQL5](https://c.mql5.com/i/articles/overlay.png)
The Drawing Styles in MQL5
There are 6 drawing styles in MQL4 and 18 drawing styles in MQL5. Therefore, it may be worth writing an article to introduce MQL5's drawing styles. In this article, we will consider the details of drawing styles in MQL5. In addition, we will create an indicator to demonstrate how to use these drawing styles, and refine the plotting.
![Practical Implementation of Digital Filters in MQL5 for Beginners](https://c.mql5.com/2/0/Filter.png)
![Practical Implementation of Digital Filters in MQL5 for Beginners](https://c.mql5.com/i/articles/overlay.png)
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.
![MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors](https://c.mql5.com/2/0/chainik__1.png)
![MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors](https://c.mql5.com/i/articles/overlay.png)
MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors
In order to obtain values of a built-in or custom indicator in an Expert Advisor, first its handle should be created using the corresponding function. Examples in the article show how to use this or that technical indicator while creating your own programs. The article describes indicators that are built n the MQL5 language. It is intended for those who don't have much experience in the development of trading strategies and offers simple and clear ways of working with indicators using the offered library of functions.
![Event handling in MQL5: Changing MA period on-the-fly](https://c.mql5.com/2/0/How_Change_Period_Moving_Average_on_the_fly_MQL5__1.png)
![Event handling in MQL5: Changing MA period on-the-fly](https://c.mql5.com/i/articles/overlay.png)
Event handling in MQL5: Changing MA period on-the-fly
Suppose that simple MA (Moving Average) indicator with period 13 is applied to a chart. And we want to change the period to 20, but we do not want to go to indicator properties dialog box and edit the number 13 to 20: simply tired of these tedious actions with mouse and keyboard. And especially we don't want to open indicator code and modify it. We want to do all this with a single press of a button - "up arrows" next to the numeric keypad. In this article I'll describe how to do it.
![How to call indicators in MQL5](https://c.mql5.com/2/0/Calling_indicators_MQL5.png)
![How to call indicators in MQL5](https://c.mql5.com/i/articles/overlay.png)
How to call indicators in MQL5
With new version of MQL programming language available not only the approach of dealing with indicators have changed, but there are also new ways of how to create indicators. Furthermore, you have additional flexibility working with indicator's buffers - now you can specify the desired direction of indexing and get exactly as many indicator's values as you want. This article explains the basic methods of calling indicators and retrieving data from the indicator's buffers.
![Custom Indicators in MQL5 for Newbies](https://c.mql5.com/2/0/s_002__1.png)
![Custom Indicators in MQL5 for Newbies](https://c.mql5.com/i/articles/overlay.png)
Custom Indicators in MQL5 for Newbies
Any new subject seems complicated and hard-to-learn for a newbie. Subjects that we know seem very simple and clear to us. But we simply do not remember, that everyone has to study something from scratch, and even our native language. The same is with the MQL5 programming language that offers wide possibilities of developing one's own trading strategies - you can start learning it from basic notions and simplest examples. Interaction of a technical indicator with the MetaTrader 5 client terminal is consider in this article on the example of the simple custom indicator SMA.
![The Order of Object Creation and Destruction in MQL5](https://c.mql5.com/2/0/recycle_ava__1.png)
![The Order of Object Creation and Destruction in MQL5](https://c.mql5.com/i/articles/overlay.png)
The Order of Object Creation and Destruction in MQL5
Every object, whether it is a custom object, a dynamic array or an array of objects, is created and deleted in MQL5-program in its particular way. Often, some objects are part of other objects, and the order of object deleting at deinitialization becomes especially important. This article provides some examples that cover the mechanisms of working with objects.
![MQL5.community - User Memo](https://c.mql5.com/2/0/helpButton__1.png)
![MQL5.community - User Memo](https://c.mql5.com/i/articles/overlay.png)
MQL5.community - User Memo
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
![How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services](https://c.mql5.com/2/0/mql_net__1.png)
![How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services](https://c.mql5.com/i/articles/overlay.png)
How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services
Want to organize export of quotes from MetaTrader 5 to your own application? The MQL5-DLL junction allows to create such solutions! This article will show you one of the ways to export quotes from MetaTrader 5 to applications written in .NET. For me it was more interesting, rational and easy to implement export of quotes using this very platform. Unfortunately, version 5 still does not support .NET, so like in old days we will use win32 dll with .NET support as an interlayer.
![Easy Stock Market Trading with MetaTrader](https://c.mql5.com/2/16/779_23.gif)
![Easy Stock Market Trading with MetaTrader](https://c.mql5.com/i/articles/overlay.png)
Easy Stock Market Trading with MetaTrader
This article raises the issues of automated trading on the stock market. Examples of MetaTrader 4 and QUIK integration are provided for your information. In addition to that, you can familiarize yourself with MetaTrader advantages aimed at solving this issue, and see how a trading robot can perform operations on MICEX.
![Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded](https://c.mql5.com/2/17/872_36.png)
![Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded](https://c.mql5.com/i/articles/overlay.png)
Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded
In this article we will check the well-known statement that "The whole day trading depends on how the Asian session is traded".
![Applying One Indicator to Another](https://c.mql5.com/2/0/indikators_001.png)
![Applying One Indicator to Another](https://c.mql5.com/i/articles/overlay.png)
Applying One Indicator to Another
When writing an indicator that uses the short form of the OnCalculate() function call, you might miss the fact that an indicator can be calculated not only by price data, but also by data of some other indicator (no matter whether it is a built-in or custom one). Do you want to improve an indicator for its correct application to the other indicator's data? In this article we'll review all the steps required for such modification.
![The Price Histogram (Market Profile) and its implementation in MQL5](https://c.mql5.com/2/0/price__1.png)
![The Price Histogram (Market Profile) and its implementation in MQL5](https://c.mql5.com/i/articles/overlay.png)
The Price Histogram (Market Profile) and its implementation in MQL5
The Market Profile was developed by trully brilliant thinker Peter Steidlmayer. He suggested to use the alternative representation of information about "horizontal" and "vertical" market movements that leads to completely different set of models. He assumed that there is an underlying pulse of the market or a fundamental pattern called the cycle of equilibrium and disequilibrium. In this article I will consider Price Histogram — a simplified model of Market Profile, and will describe its implementation in MQL5.
![How to Exchange Data: A DLL for MQL5 in 10 Minutes](https://c.mql5.com/2/0/mql5_dll_sample__1.png)
![How to Exchange Data: A DLL for MQL5 in 10 Minutes](https://c.mql5.com/i/articles/overlay.png)
How to Exchange Data: A DLL for MQL5 in 10 Minutes
Now not so many developers remember how to write a simple DLL, and what are special features of different system binding. Using several examples, I will try to show the entire process of the simple DLL's creation in 10 minutes, as well as to discuss some technical details of our binding implementation. I will show the step-by-step process of DLL creation in Visual Studio with examples of exchanging different types of variables (numbers, arrays, strings, etc.). Besides I will explain how to protect your client terminal from crashes in custom DLLs.
![Data Exchange between Indicators: It's Easy](https://c.mql5.com/2/0/v5__1.png)
![Data Exchange between Indicators: It's Easy](https://c.mql5.com/i/articles/overlay.png)
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.
![MQL5: Create Your Own Indicator](https://c.mql5.com/2/0/indikator__1.png)
![MQL5: Create Your Own Indicator](https://c.mql5.com/i/articles/overlay.png)
MQL5: Create Your Own Indicator
What is an indicator? It is a set of calculated values that we want to be displayed on the screen in a convenient way. Sets of values are represented in programs as arrays. Thus, creation of an indicator means writing an algorithm that handles some arrays (price arrays) and records results of handling to other arrays (indicator values). By describing creation of True Strength Index, the author shows how to write indicators in MQL5.
![Here Comes the New MetaTrader 5 and MQL5](https://c.mql5.com/2/0/851_25.jpg)
![Here Comes the New MetaTrader 5 and MQL5](https://c.mql5.com/i/articles/overlay.png)
Here Comes the New MetaTrader 5 and MQL5
This is just a brief review of MetaTrader 5. I can't describe all the system's new features for such a short time period - the testing started on 2009.09.09. This is a symbolical date, and I am sure it will be a lucky number. A few days have passed since I got the beta version of the MetaTrader 5 terminal and MQL5. I haven't managed to try all its features, but I am already impressed.
![Meta COT Project - New Horizons for CFTC Report Analysis in MetaTrader 4](https://c.mql5.com/2/17/858_49.jpg)
![Meta COT Project - New Horizons for CFTC Report Analysis in MetaTrader 4](https://c.mql5.com/i/articles/overlay.png)
Meta COT Project - New Horizons for CFTC Report Analysis in MetaTrader 4
The article is about the use of CFTC report data (Open Interest) in MetaTrader. The article describes the proposed META COT project in details, shows how to load and process the necessary information. The Expert Advisor included into the project will help us analyze the effectiveness of the concept presented in the article. Finally, we'll draw some conclusions and offer useful suggestions.
![FANN2MQL Neural Network Tutorial](https://c.mql5.com/2/17/868_6.jpg)
![FANN2MQL Neural Network Tutorial](https://c.mql5.com/i/articles/overlay.png)
FANN2MQL Neural Network Tutorial
This article has been made to show you how to use neural networks, via FANN2MQL, using an easy example: teaching a simple pattern to the neuralnetwork, and testing it to see if it can recognize patterns it has never seen.
![Step on New Rails: Custom Indicators in MQL5](https://c.mql5.com/2/0/862_14.png)
![Step on New Rails: Custom Indicators in MQL5](https://c.mql5.com/i/articles/overlay.png)
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.
![Auto-Generated Documentation for MQL5 Code](https://c.mql5.com/2/0/ava.png)
![Auto-Generated Documentation for MQL5 Code](https://c.mql5.com/i/articles/overlay.png)
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.
![Trader's Kit: Decorating Indicators](https://c.mql5.com/2/17/799_33.jpg)
![Trader's Kit: Decorating Indicators](https://c.mql5.com/i/articles/overlay.png)
Trader's Kit: Decorating Indicators
In this article you will find main tasks when decorating indicators, their solution and automation.
![Working with Doubles in MQL4](https://c.mql5.com/2/16/762_31.png)
![Working with Doubles in MQL4](https://c.mql5.com/i/articles/overlay.png)
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.
![Interaction between MеtaTrader 4 and MATLAB Engine (Virtual MATLAB Machine)](https://c.mql5.com/2/16/782_20.gif)
![Interaction between MеtaTrader 4 and MATLAB Engine (Virtual MATLAB Machine)](https://c.mql5.com/i/articles/overlay.png)
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.
![Superposition and Interference of Financial Securities](https://c.mql5.com/2/17/800_14.gif)
![Superposition and Interference of Financial Securities](https://c.mql5.com/i/articles/overlay.png)
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?
![On the Long Way to Be a Successful Trader - The Two Very First Steps](https://c.mql5.com/2/17/813_17.gif)
![On the Long Way to Be a Successful Trader - The Two Very First Steps](https://c.mql5.com/i/articles/overlay.png)
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.
![Using Neural Networks In MetaTrader](https://c.mql5.com/2/16/777_40.gif)
![Using Neural Networks In MetaTrader](https://c.mql5.com/i/articles/overlay.png)
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.