Articles on manual and algorithmic trading in MetaTrader 5

icon

This category features articles on all aspects of trading - from manual to fully automatic trading, from Expert Advisor ideas to trading robot creation using the MQL5 Wizard. Position management, processing of trade events and money management - these integral parts of trading are covered in theses articles.

Learn how to copy trading signals and how to provide around-the-clock operation of Expert Advisors, how to create a trading robot and how to run MetaTrader on Linux and MacOS, what social trading is and how to order a trading robot.

Add a new article
latest | best
MQL5 Wizard for Dummies
MQL5 Wizard for Dummies

MQL5 Wizard for Dummies

In early 2011 we released the first version of the MQL5 Wizard. This new application provides a simple and convenient tool to automatically generate trading robots. Any MetaTrader 5 user can create a custom Expert Advisor without even knowing how to program in MQL5.
MQL5 Wizard: New Version
MQL5 Wizard: New Version

MQL5 Wizard: New Version

The article contains descriptions of the new features available in the updated MQL5 Wizard. The modified architecture of signals allow creating trading robots based on the combination of various market patterns. The example contained in the article explains the procedure of interactive creation of an Expert Advisor.
How to Order an Expert Advisor and Obtain the Desired Result
How to Order an Expert Advisor and Obtain the Desired Result

How to Order an Expert Advisor and Obtain the Desired Result

How to write correctly the Requirement Specifications? What should and should not be expected from a programmer when ordering an Expert Advisor or an indicator? How to keep a dialog, what moments to pay special attention to? This article gives the answers to these, as well as to many other questions, which often don't seem obvious to many people.
The Indicators of the Micro, Middle and Main Trends
The Indicators of the Micro, Middle and Main Trends

The Indicators of the Micro, Middle and Main Trends

The aim of this article is to investigate the possibilities of trade automation and the analysis, on the basis of some ideas from a book by James Hyerczyk "Pattern, Price & Time: Using Gann Theory in Trading Systems" in the form of indicators and Expert Advisor. Without claiming to be exhaustive, here we investigate only the Model - the first part of the Gann theory.
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.
preview
Trade Events in MetaTrader 5

Trade Events in MetaTrader 5

A monitoring of the current state of a trade account implies controlling open positions and orders. Before a trade signal becomes a deal, it should be sent from the client terminal as a request to the trade server, where it will be placed in the order queue awaiting to be processed. Accepting of a request by the trade server, deleting it as it expires or conducting a deal on its basis - all those actions are followed by trade events; and the trade server informs the terminal about them.
preview
Orders, Positions and Deals in MetaTrader 5

Orders, Positions and Deals in MetaTrader 5

Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
How to Copy Trading from MetaTrader 5 to MetaTrader 4
How to Copy Trading from MetaTrader 5 to MetaTrader 4

How to Copy Trading from MetaTrader 5 to MetaTrader 4

Is it possible to trade on a real MetaTrader 5 account today? How to organize such trading? The article contains the theory of these questions and the working codes used for copying trades from the MetaTrader 5 terminal to MetaTrader 4. The article will be useful both for the developers of Expert Advisors and for practicing traders.
Create Your Own Expert Advisor in MQL5 Wizard
Create Your Own Expert Advisor in MQL5 Wizard

Create Your Own Expert Advisor in MQL5 Wizard

The knowledge of programming languages is no longer a prerequisite for creating trading robots. Earlier lack of programming skills was an impassable obstacle to the implementation of one's own trading strategies, but with the emergence of the MQL5 Wizard, the situation radically changed. Novice traders can stop worrying because of the lack of programming experience - with the new Wizard, which allows you to generate Expert Advisor code, it is not necessary.
Technical Analysis: How Do We Analyze?
Technical Analysis: How Do We Analyze?

Technical Analysis: How Do We Analyze?

This article briefly describes the author's opinion on redrawing indicators, multi-timeframe indicators and displaying of quotes with Japanese candlesticks. The article contain no programming specifics and is of a general character.
Guide to Testing and Optimizing of Expert Advisors in MQL5
Guide to Testing and Optimizing of Expert Advisors in MQL5

Guide to Testing and Optimizing of Expert Advisors in MQL5

This article explains the step by step process of identifying and resolving code errors as well as the steps in testing and optimizing of the Expert Advisor input parameters. You will learn how to use Strategy Tester of MetaTrader 5 client terminal to find the best symbol and set of input parameters for your Expert Advisor.
Technical Analysis: What Do We Analyze?
Technical Analysis: What Do We Analyze?

Technical Analysis: What Do We Analyze?

This article tries to analyze several peculiarities of representation of quotes available in the MetaTrader client terminal. The article is general, it doesn't concern programming.
Evaluation of Trade Systems - the Effectiveness of Entering, Exiting and Trades in General
Evaluation of Trade Systems - the Effectiveness of Entering, Exiting and Trades in General

Evaluation of Trade Systems - the Effectiveness of Entering, Exiting and Trades in General

There are a lot of measures that allow determining the effectiveness and profitability of a trade system. However, traders are always ready to put any system to a new crash test. The article tells how the statistics based on measures of effectiveness can be used for the MetaTrader 5 platform. It includes the class for transformation of the interpretation of statistics by deals to the one that doesn't contradict the description given in the "Statistika dlya traderov" ("Statistics for Traders") book by S.V. Bulashev. It also includes an example of custom function for optimization.
Controlling the Slope of Balance Curve During Work of an Expert Advisor
Controlling the Slope of Balance Curve During Work of an Expert Advisor

Controlling the Slope of Balance Curve During Work of an Expert Advisor

Finding rules for a trade system and programming them in an Expert Advisor is a half of the job. Somehow, you need to correct the operation of the Expert Advisor as it accumulates the results of trading. This article describes one of approaches, which allows improving performance of an Expert Advisor through creation of a feedback that measures slope of the balance curve.
Several Ways of Finding a Trend in MQL5
Several Ways of Finding a Trend in MQL5

Several Ways of Finding a Trend in MQL5

Any trader would give a lot for opportunity to accurately detect a trend at any given time. Perhaps, this is the Holy Grail that everyone is looking for. In this article we will consider several ways to detect a trend. To be more precise - how to program several classical ways to detect a trend by means of MQL5.
Limitations and Verifications in Expert Advisors
Limitations and Verifications in Expert Advisors

Limitations and Verifications in Expert Advisors

Is it allowed to trade this symbol on Monday? Is there enough money to open position? How big is the loss if Stop Loss triggers? How to limit the number of pending orders? Was the trade operation executed at the current bar or at the previous one? If a trade robot cannot perform this kind of verifications, then any trade strategy can turn into a losing one. This article shows the examples of verifications that are useful in any Expert Advisor.
Functions for Money Management in an Expert Advisor
Functions for Money Management in an Expert Advisor

Functions for Money Management in an Expert Advisor

The development of trading strategies primarily focuses on searching for patterns for entering and exiting the market, as well as maintaining positions. If we are able to formalize some patterns into rules for automated trading, then the trader faces the question of calculating the volume of positions, the size of the margins, as well as maintaining a safe level of mortgage funds for assuring open positions in an automated mode. In this article we will use the MQL5 language to construct simple examples of conducting these calculations.
An Example of a Trading Strategy Based on Timezone Differences on Different Continents
An Example of a Trading Strategy Based on Timezone Differences on Different Continents

An Example of a Trading Strategy Based on Timezone Differences on Different Continents

Surfing the Internet, it is easy to find many strategies, which will give you a number of various recommendations. Let’s take an insider’s approach and look into the process of strategy creation, based on the differences in timezones on different continents.
A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment
A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment

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.
Drawing Indicator's Emissions in MQL5
Drawing Indicator's Emissions in MQL5

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.
Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded
Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded

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".
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

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.
Channels. Advanced Models. Wolfe Waves
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.
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"

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.
Individual Psychology of a Trader
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.
Forecasting Financial Time-Series
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.
Trend-Hunting
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.
Market Diagnostics by Pulse
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.
Comfortable Scalping
Comfortable Scalping

Comfortable Scalping

The article describes the method of creating a tool for comfortable scalping. However, such an approach to trade opening can be applied in any trading.
Comparative Analysis of 30 Indicators and Oscillators
Comparative Analysis of 30 Indicators and Oscillators

Comparative Analysis of 30 Indicators and Oscillators

The article describes an Expert Advisor that allows conducting the comparative analysis of 30 indicators and oscillators aiming at the formation of an effective package of indexes for trading.
Metalanguage of Graphical Lines-Requests. Trading and Qualified Trading Learning
Metalanguage of Graphical Lines-Requests. Trading and Qualified Trading Learning

Metalanguage of Graphical Lines-Requests. Trading and Qualified Trading Learning

The article describes a simple, accessible language of graphical trading requests compatible with traditional technical analysis. The attached Gterminal is a half-automated Expert Advisor using in trading results of graphical analysis. Better used for self-education and training of beginning traders.
Betting Modeling as Means of Developing "Market Intuition"
Betting Modeling as Means of Developing "Market Intuition"

Betting Modeling as Means of Developing "Market Intuition"

The article dwells on the notion of "market intuition" and ways of developing it. The method described in the article is based on the modeling of financial betting in the form of a simple game.
Terminal Service Client. How to Make Pocket PC a Big Brother's Friend
Terminal Service Client. How to Make Pocket PC a Big Brother's Friend

Terminal Service Client. How to Make Pocket PC a Big Brother's Friend

The article describes the way of connecting to the remote PC with installed MT4 Client Terminal via a PDA.
Trading Strategy Based on Pivot Points Analysis
Trading Strategy Based on Pivot Points Analysis

Trading Strategy Based on Pivot Points Analysis

Pivot Points (PP) analysis is one of the simplest and most effective strategies for high intraday volatility markets. It was used as early as in the precomputer times, when traders working at stocks could not use any ADP equipment, except for counting frames and arithmometers.
Automated Choice of Brokerage Company for an Efficient Operation of Expert Advisors
Automated Choice of Brokerage Company for an Efficient Operation of Expert Advisors

Automated Choice of Brokerage Company for an Efficient Operation of Expert Advisors

It is not a secret that for an efficient operation of Expert Advisors we need to find a suitable brokerage company. This article describes a system approach to this search. You will get acquainted with the process of creating a program with dll for working with different terminals.
Problems of Technical Analysis Revisited
Problems of Technical Analysis Revisited

Problems of Technical Analysis Revisited

At present, technical analysis along with the fundamental one is the most important method to analyze stock market. Being one of the predicting methods of stock market pricing dynamics, the technical analysis has a large amount of disadvantages that cast some doubt on its practical applicability.
Principles of Time Transformation in Intraday Trading
Principles of Time Transformation in Intraday Trading

Principles of Time Transformation in Intraday Trading

This article contains the concept of operation time that allows to receive more even price flow. It also contains the code of the changed moving average with an allowance for this time transformation.
Mathematics in Trading: How to Estimate Trade Results
Mathematics in Trading: How to Estimate Trade Results

Mathematics in Trading: How to Estimate Trade Results

We all are aware of that "No profit obtained in the past will guarantee any success in future". However, it is still very actual to be able to estimate trading systems. This article deals with some simple and convenient methods that will help to estimate trade results.