Download MetaTrader 5

MQL4 Programming Articles

Here you can find articles on MQL4 - programming language of trading strategies. Most of them are written by traders and active members of MQL5.community. For more convenience, all articles are grouped into several categories - Experts, Indicators, Trading Systems, etc.

Watch out for new articles and discuss them on the Forum!

latest | best

MetaTrader 4 on Mac OS

Apple products have become very popular. MetaQuotes Software Corp. attentively follows the progress of the IT industry and has already released the special mobile applications for iOS-based devices -...

Price Action. Automating the Engulfing Pattern Trading Strategy

This article describes a process of creating an Expert Advisor for MetaTrader 4 based on the Engulfing pattern, as well as the pattern recognition principle, rules of setting pending orders and stop...

MetaTrader 4 on Linux

Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. Many home PC users prefer it to MS Windows series. Linux systems...

Common Errors in MQL4 Programs and How to Avoid Them

To avoid critical completion of programs, the previous version compiler handled many errors in the runtime environment. For example, division by zero or array out of range are critical errors and...

Price Action. Automating the Inside Bar Trading Strategy

The article describes the development of a MetaTrader 4 Expert Advisor based on the Inside Bar strategy, including Inside Bar detection principles, as well as pending and stop order setting rules....

Identifying Trade Setups by Support, Resistance and Price Action

This article shows how price action and the monitoring of support and resistance levels can be used for well-timed market entry. It discusses a trading system that effectively combines the two for the...

How to Develop a Profitable Trading Strategy

This article provides an answer to the question: "Is it possible to formulate an automated trading strategy based on history data with neural networks?".

Trading Ideas Based on Prices Direction and Movement Speed

The article provides a review of an idea based on the analysis of prices' movement direction and their speed. We have performed its formalization in the MQL4 language presented as an expert advisor to...

Testing and Optimization of Expert Advisors

The article provides a detailed description of the process of testing and optimizing Expert Advisors in the MetaTrader 4 Strategy Tester. The importance of such information and the need for this...

How to build and test a Binary Options strategy with the MetaTrader 4 Strategy Tester

Tutorial to build a Binary Options strategy an test it in Strategy-Tester of MetaTrader 4 with Binary-Options-Strategy-Tester utility from marketplace.

Practical Application of Cluster Indicators in FOREX

Cluster indicators are sets of indicators that divide currency pairs into separate currencies. Indicators allow to trace the relative currency fluctuation, determine the potential of forming new...

Theoretical Basis of Building Cluster Indicators for FOREX

Cluster indicators are sets of indicators that divide currency pairs into separate currencies. Indicators allow to trace the relative currency fluctuation, determine the potential of formating new...

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

Expert Advisor Sample

The principles of MQL4-programs development are shown on sample of creating a simple Expert Advisor system based on the standard MACD indicator.

Sound Alerts in Indicators

How to create "voice" indicators for daily usage.

What the Numbers in the Expert Testing Report Mean

Article explains how to read testing reports and to interpret the obtained results properly.

MQL4 Language for Newbies. Custom Indicators (Part 1)

This is the fourth article from the series "MQL4 Languages for Newbies". Today we will learn to write custom indicators. We will get acquainted with the classification of indicator features, will see...

Portfolio trading in MetaTrader 4

The article reveals the portfolio trading principles and their application to Forex market. A few simple mathematical portfolio arrangement models are considered. The article contains examples of...

Offline Charts in the New MQL4

Updated MQL4 has the new format for storing historical data and provides the appropriate MqlRates structure for convenient storage of Time, Open, Low, High, Close and Volume values. For many years,...

How to create an indicator of non-standard charts for MetaTrader Market

Through offline charts, programming in MQL4, and reasonable willingness, you can get a variety of chart types: "Point & Figure", "Renko", "Kagi", "Range bars", equivolume charts, etc. In this article,...

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

Working with currency baskets in the Forex market

The article describes how currency pairs can be divided into groups (baskets), as well as how to obtain data about their status (for example, overbought and oversold) using certain indicators and how...

How we developed the MetaTrader Signals service and Social Trading

We continue to enhance the Signals service, improve the mechanisms, add new functions and fix flaws. The MetaTrader Signals Service of 2012 and the current MetaTrader Signals Service are like two...

ZUP - Universal ZigZag with Pesavento Patterns. Part 1

The article gives a short description of ideas underlying indicator ZUP - Universal ZigZag with Pesavento Patterns. The article also describes indicators of ZigZag embedded in ZUP.

ZUP - universal ZigZag with Pesavento patterns. Graphical interface

Over the ten years since the release of the first version of the ZUP platform, it has undergone through multiple changes and improvements. As a result, now we have a unique graphical add-on for...

Data Structure in MetaTrader 4 Build 600 and Higher

MetaTarder 4 build 600 features the new structure and location of the client terminal files. Now, MQL4 applications are placed in separate directories according to the program type (Expert Advisors,...

Deep neural network with Stacked RBM. Self-training, self-control

This article is a continuation of previous articles on deep neural network and predictor selection. Here we will cover features of a neural network initiated by Stacked RBM, and its implementation in...

MQL4 Language for Newbies. Custom Indicators (Part 2)

This is the fifth article from the series "MQL4 Languages for Newbies". Today we will learn to use graphical objects - a very powerful development tool that allows to widen substantially possibilities...

False trigger protection for Trading Robot

Profitability of trading systems is defined not only by logic and precision of analyzing the financial instrument dynamics, but also by the quality of the performance algorithm of this logic. False...

Protect Yourselves, Developers!

Protection of intellectual property is still a big problem. This article describes the basic principles of MQL4-programs protection. Using these principles you can ensure that results of your...

MagicNumber: "Magic" Identifier of the Order

The article deals with the problem of conflict-free trading of several experts on the same МТ 4 Client Terminal. It "teaches" the expert to manage only "its own" orders without modifying or closing...

Orders Management - It's Simple

The article deals with various ways of how to control open positions and pending orders. It is devoted to simplifying of writing Expert Advisors.

Upgrade to MetaTrader 4 Build 600 and Higher

The new version of the MetaTrader 4 terminal features the updated structure of user data storage. In earlier versions all programs, templates, profiles etc. were stored directly in terminal...

Applying fuzzy logic in trading by means of MQL4

The article deals with examples of applying fuzzy set theory in trading by means of MQL4. The use of FuzzyNet library for MQL4 in the development of an indicator and an Expert Advisor is described as...

Managing the MetaTrader Terminal via DLL

The article deals with managing MetaTrader user interface elements via an auxiliary DLL library using the example of changing push notification delivery settings. The library source code and the...

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

Automated Optimization of a Trading Robot in Real Trading

The articles describes and provides a library of functions that allows a trader to optimize his or her Expert Advisor's inputs by launching optimization directly from the EA.

Fuzzy logic to create manual trading strategies

This article suggests the ways of improving manual trading strategy by applying fuzzy set theory. As an example we have provided a step-by-step description of the strategy search and the selection of...

Secrets of MetaTrader 4 Client Terminal

21 way to ease the life: Latent features in MetaTrader 4 Client Terminal.Full screen; hot keys; Fast Navigation bar; minimizing windows; favorites; traffic reduction; disabling of news; symbol sets;...

MQL4 Language for Newbies. Technical Indicators and Built-In Functions

This is the third article from the series "MQL4 Language for Newbies". Now we will learn to use built-in functions and functions for working with technical indicators. The latter ones will be...