MQL5 Programming Articles

icon

Study the MQL5 language for programming trading strategies in numerous published articles mostly written by you - the community members. The articles are grouped into categories to help you quicker find answers to any questions related to programming: Integration, Tester, Trading Strategies, etc.

Follow our new publications and discuss them on the Forum!

Add a new article
latest | best
Order Strategies. Multi-Purpose Expert Advisor
Order Strategies. Multi-Purpose Expert Advisor

Order Strategies. Multi-Purpose Expert Advisor

This article centers around strategies that actively use pending orders, a metalanguage that can be created to formally describe such strategies and the use of a multi-purpose Expert Advisor whose operation is based on those descriptions
Neural Networks: From Theory to Practice
Neural Networks: From Theory to Practice

Neural Networks: From Theory to Practice

Nowadays, every trader must have heard of neural networks and knows how cool it is to use them. The majority believes that those who can deal with neural networks are some kind of superhuman. In this article, I will try to explain to you the neural network architecture, describe its applications and show examples of practical use.
MetaTrader 5 on Linux
MetaTrader 5 on Linux

MetaTrader 5 on Linux

In this article, we demonstrate an easy way to install MetaTrader 5 on popular Linux versions — Ubuntu and Debian. These systems are widely used on server hardware as well as on traders’ personal computers.
MetaTrader 5 on Mac OS
MetaTrader 5 on Mac OS

MetaTrader 5 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 - MetaTrader 4 for iPhone and MetaTrader 5 for iPhone. There are many topics on MQL5.community forum, where people are seeking a solution for running MetaTrader 5 under Mac OS operating system. In this article, you will find out how to work with MetaTrader 5 via the Apple's popular operating system.
General information on Trading Signals for MetaTrader 4 and MetaTrader 5
General information on Trading Signals for MetaTrader 4 and MetaTrader 5

General information on Trading Signals for MetaTrader 4 and MetaTrader 5

MetaTrader 4 / MetaTrader 5 Trading Signals is a service allowing traders to copy trading operations of a Signals Provider. Our goal was to develop the new massively used service protecting Subscribers and relieving them of unnecessary costs.
Interview with Alexey Masterov (ATC 2012)
Interview with Alexey Masterov (ATC 2012)

Interview with Alexey Masterov (ATC 2012)

We do our best to introduce all the leading Championship Participants to our audience in reasonable time. To achieve that, we closely monitor the most promising contestants in our TOP-10 and arrange interviews with them. However, the sharp rise of Alexey Masterov (reinhard) up to the third place has become a real surprise!
How to Prepare MetaTrader 5 Quotes for Other Applications
How to Prepare MetaTrader 5 Quotes for Other Applications

How to Prepare MetaTrader 5 Quotes for Other Applications

The article describes the examples of creating directories, copying data, filing, working with the symbols in Market Watch or the common list, as well as the examples of handling errors, etc. All these elements can eventually be gathered in a single script for filing the data in a user-defined format.
Interview with Sergey Pankratyev (ATC 2012)
Interview with Sergey Pankratyev (ATC 2012)

Interview with Sergey Pankratyev (ATC 2012)

The Championship is coming to an end leaving us with vivid impressions of many unusual trading strategies. However, the trading robot of Sergey Pankratyev (s75) is showing really peculiar things - it is trading all 12 currency pairs opening only long positions. It is not an error but just a response to some certain market conditions.
Interview with Enbo Lu (ATC 2012)
Interview with Enbo Lu (ATC 2012)

Interview with Enbo Lu (ATC 2012)

"Be sure to participate in the Automated Trading Championships, where you can get a truly invaluable experience!" - this is the motto of contestant Enbo Lu (luenbo) from China. He appeared in the TOP-10 of Automated Trading Championship 2012 last week and is now consistently trying to reach the podium.
Interview with Sergey Abramov (ATC 2012)
Interview with Sergey Abramov (ATC 2012)

Interview with Sergey Abramov (ATC 2012)

The trading robot of Sergey Abramov (26405) is staying in TOP-10 since the second week. However, it caused much anxiety for its developer. As it turned out, the robot contains a small error in position close block. The robot has been developed almost exclusively on the basis of the past years' results.
Interview with Ruslan Ziyatdinov (ATC 2012)
Interview with Ruslan Ziyatdinov (ATC 2012)

Interview with Ruslan Ziyatdinov (ATC 2012)

The Championship keeps providing us with new discoveries, as well as new interesting Participants and unusual ideas implemented in the competition trading robots. While interviewing Ruslan Ziyatdinov (rusland1962), we learned about his simple approach to trading and found out why it is better to trade less frequently.
Interview with Alexandr Artapov (ATC 2012)
Interview with Alexandr Artapov (ATC 2012)

Interview with Alexandr Artapov (ATC 2012)

It was during the second week of the Championship when the Expert Advisor of Alexandr Artapov (artall) found itself on the third position trading EURUSD and EURJPY. Then it briefly left TOP-10 to appear again after one month of struggle for survival. As it turned out, this trading robot is still having something up its sleeve.
Interview with Mariusz Zarnowski (ATC 2012)
Interview with Mariusz Zarnowski (ATC 2012)

Interview with Mariusz Zarnowski (ATC 2012)

As December 28 is approaching, the list of leaders of the Automated Trading Championship 2012 is becoming clearer. With only two weeks to go until the end of the Championship, Mariusz Zarnowski (zrn) from Poland stands a good chance to be in the top three. His EA has already demonstrated how it can triple the initial deposit in just a couple of weeks.
Machine Learning: How Support Vector Machines can be used in Trading
Machine Learning: How Support Vector Machines can be used in Trading

Machine Learning: How Support Vector Machines can be used in Trading

Support Vector Machines have long been used in fields such as bioinformatics and applied mathematics to assess complex data sets and extract useful patterns that can be used to classify data. This article looks at what a support vector machine is, how they work and why they can be so useful in extracting complex patterns. We then investigate how they can be applied to the market and potentially used to advise on trades. Using the Support Vector Machine Learning Tool, the article provides worked examples that allow readers to experiment with their own trading.
Interview with Evgeny Gnidko (ATC 2012)
Interview with Evgeny Gnidko (ATC 2012)

Interview with Evgeny Gnidko (ATC 2012)

The Expert Advisor of Evgeny Gnidko (FIFO) currently seems to be the most stable one at the Automated Trading Championship 2012. This trading robot entered TOP-10 at the third week remaining one of the leading Expert Advisors ever since.
Interview with Juan Pablo Alonso Escobar (ATC 2012)
Interview with Juan Pablo Alonso Escobar (ATC 2012)

Interview with Juan Pablo Alonso Escobar (ATC 2012)

"Everyone who is struggling with programming and who were not able to participate in this year's competition, know that it becomes a lot easier in time", said Juan Pablo Alonso Escobar (JPAlonso), the hero of today's interview.
preview
How to become a Signals Provider for MetaTrader 4 and MetaTrader 5

How to become a Signals Provider for MetaTrader 4 and MetaTrader 5

Do you want to offer your trading signals and make profit? Register on MQL5.com website as a Seller, specify your trading account and offer traders a subscription to copy your trades.
How to Test a Trading Robot Before Buying
How to Test a Trading Robot Before Buying

How to Test a Trading Robot Before Buying

Buying a trading robot on MQL5 Market has a distinct benefit over all other similar options - an automated system offered can be thoroughly tested directly in the MetaTrader 5 terminal. Before buying, an Expert Advisor can and should be carefully run in all unfavorable modes in the built-in Strategy Tester to get a complete grasp of the system.
Interview with Dmitry Terentew (ATC 2012)
Interview with Dmitry Terentew (ATC 2012)

Interview with Dmitry Terentew (ATC 2012)

Is it really necessary to be a programmer to develop trading robots? Do we need to spend years monitoring price charts to be able to "feel" the market? All these issues have been discussed in our interview with Dmitry Terentew (SAFF), whose trading robot has been occupying the first page of the Championship from the very beginning.
Interview with Anton Nel (ATC 2012)
Interview with Anton Nel (ATC 2012)

Interview with Anton Nel (ATC 2012)

Today we talk to Anton Nel (ROMAN5) from South Africa, a professional developer of automated trading systems. Obviously, his Expert Advisor just could not go unnoticed. Breaking into the top ten from the very start of the Championship, it has been holding the first place for more than a week.
Interview with Matúš German (ATC 2012)
Interview with Matúš German (ATC 2012)

Interview with Matúš German (ATC 2012)

It's the second time Matúš German participates in the Automated Trading Championship. By the end of the fourth week of ATC 2012 his Expert Advisor has been holding its positions in the TOP-10 having about $30 000. Matúš is from Slovakia, from the little town Bardejov. Matúš is interested in trading for about 5 years and he develops Expert Advisors for 3 years already.
How Secure Is It to Buy MQL5 Market Products?
How Secure Is It to Buy MQL5 Market Products?

How Secure Is It to Buy MQL5 Market Products?

We have launched the service for selling MetaTrader 5 trading applications paying much attention to security issues. We have minimized all associated risks to allow you to concentrate on more important matters - searching for the most suitable trading robot!
Advantages of MQL5 Signals
Advantages of MQL5 Signals

Advantages of MQL5 Signals

Trading Signals service recently introduced in MetaTrader 5 allows traders to copy trading operations of any signals provider. Users can select any signal, subscribe to it and all deals will be copied at their accounts. Signals providers can set their subscription prices and receive a fixed monthly fee from their subscribers.
Interview with Egidijus Bockus (ATC 2012)
Interview with Egidijus Bockus (ATC 2012)

Interview with Egidijus Bockus (ATC 2012)

"I examined many indicators before realizing that they are not necessary for making money on Forex" - our present interviewee Egidijus Bockus (Egidijus) told us boldly. We have all reasons to take his words seriously, as his Expert Advisor occupies the third place with more than $32 000 beginning from the third week of the Automated Trading Championship 2012.
Interview with Alexander Prishchenko (ATC 2012)
Interview with Alexander Prishchenko (ATC 2012)

Interview with Alexander Prishchenko (ATC 2012)

What can be more complicated than a multicurrency trading robot? Surely, it is an automated strategy based on Elliott Wave Principle. Can we imagine something more complicated than that? Yes, we can. It is a multicurrency Expert Advisor using Elliott Waves on each currency pair! Alexander Prishchenko (Crucian) believes that even a newcomer can learn the rules.
How to Write a Good Description for a Market Product
How to Write a Good Description for a Market Product

How to Write a Good Description for a Market Product

MQL5 Market has many products for sale but some of their descriptions leave much to be desired. Many texts are obviously in need of improvement, as common traders are not able to comprehend them. This article will help you to put your product in a favorable light. Use our recommendations to write an eye-catching description that will easily show your customers what exactly you are selling.
Interview with Francisco García García (ATC 2012)
Interview with Francisco García García (ATC 2012)

Interview with Francisco García García (ATC 2012)

Today we interview Francisco García García (chuliweb) from Spain. A week ago his Expert Advisor reached the 8th place, but the unfortunate logic error in programming threw it from the first page of the Championship leaders. As confirmed by statistics, such an error is not uncommon for many participants.
Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs
Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs

Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs

Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs. One of the easiest and safest method is to use standard Named Pipes that work as normal file operations. They allow you to organize interprocessor client-server communication between programs. Take a look at practical examples in C++ and MQL5 that include server, client, data exchange between them and performance benchmark.
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.
How to Subscribe to Trading Signals
How to Subscribe to Trading Signals

How to Subscribe to Trading Signals

The Signals service introduces social trading with MetaTrader 4 and MetaTrader 5. The Service is integrated into the trading platform, and allows anyone to easily copy trades of professional traders. Select any of the thousands of signal providers, subscribe in a few clicks and the provider's trades will be copied on your account.
Interview with Andrey Barinov (ATC 2012)
Interview with Andrey Barinov (ATC 2012)

Interview with Andrey Barinov (ATC 2012)

It was on Friday of the Championship's first week that the trading robot of Andrey Barinov (Wahoo) occupied the fifth place in TOP-10. Andrey is a newcomer in the Championship but he has already managed to execute more than 100 orders in Jobs and develop a dozen of products for Market. We have arranged an interview with him and learned that the development of a "simple multicurrency Expert Advisor" is not an easy but a fairly easy task.
Trading Signals in MetaTrader 5: A Better Alternative to PAMM Accounts!
Trading Signals in MetaTrader 5: A Better Alternative to PAMM Accounts!

Trading Signals in MetaTrader 5: A Better Alternative to PAMM Accounts!

We are pleased to announce that MetaTrader 5 now features Trading Signals, thus giving a powerful tool to investors and managers. While you are following the trades of a successful trader, the terminal will be automatically reproducing them in your account!
Interview with Rogério Figurelli (ATC 2012)
Interview with Rogério Figurelli (ATC 2012)

Interview with Rogério Figurelli (ATC 2012)

Today we are going to talk with Rogério Figurelli (figurelli), a regular participant from Brazil that has not missed any Automated Trading Championship since 2007. This year, he also began to sell his Championship's Expert Advisor in the Market along with his other products. Rogério believes that MetaTrader 5 platform certification on the largest Brazilian exchange BM&FBOVESPA will reveal new professional developers and traders, who do not yet know the full potential of robot investors.
Interview with Achmad Hidayat (ATC 2012)
Interview with Achmad Hidayat (ATC 2012)

Interview with Achmad Hidayat (ATC 2012)

Throughout the entire duration of the Automated Trading Championship 2012, we will be providing live coverage of the events - hot reports and interviews every week. This report spotlights Achmad Hidayat (achidayat), the participant from Indonesia. On the first day of the Championship his Expert Advisor secured its position in the third ten, which is a good start. Achmad has sparked our interest with his active participation in the MQL5 Market. He has already published over 20 products thus far.
Quick Start: Short Guide for Beginners
Quick Start: Short Guide for Beginners

Quick Start: Short Guide for Beginners

Hello dear reader! In this article, I will try to explain and show you how you can easily and quickly get the hang of the principles of creating Expert Advisors, working with indicators, etc. It is beginner-oriented and will not feature any difficult or abstruse examples.
Automata-Based Programming as a New Approach to Creating Automated Trading Systems
Automata-Based Programming as a New Approach to Creating Automated Trading Systems

Automata-Based Programming as a New Approach to Creating Automated Trading Systems

This article takes us to a whole new direction in developing EAs, indicators and scripts in MQL4 and MQL5. In the future, this programming paradigm will gradually become the base standard for all traders in implementation of EAs. Using the automata-based programming paradigm, the MQL5 and MetaTrader 5 developers will be anywhere near being able to create a new language - MQL6 - and a new platform - MetaTrader 6.
Exploring Trading Strategy Classes of the Standard Library - Customizing Strategies
Exploring Trading Strategy Classes of the Standard Library - Customizing Strategies

Exploring Trading Strategy Classes of the Standard Library - Customizing Strategies

In this article we are going to show how to explore the Standard Library of Trading Strategy Classes and how to add Custom Strategies and Filters/Signals using the Patterns-and-Models logic of the MQL5 Wizard. In the end you will be able easily add your own strategies using MetaTrader 5 standard indicators, and MQL5 Wizard will create a clean and powerful code and fully functional Expert Advisor.
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.
How to purchase a trading robot from the MetaTrader Market and to install it?
How to purchase a trading robot from the MetaTrader Market and to install it?

How to purchase a trading robot from the MetaTrader Market and to install it?

A product from the MetaTrader Market can be purchased on the MQL5.com website or straight from the MetaTrader 4 and MetaTrader 5 trading platforms. Choose a desired product that suits your trading style, pay for it using your preferred payment method, and activate the product.
MetaQuotes ID in MetaTrader Mobile Terminal
MetaQuotes ID in MetaTrader Mobile Terminal

MetaQuotes ID in MetaTrader Mobile Terminal

Android and iOS powered devices offer us many features we do not even know about. One of these features is push notifications allowing us to receive personal messages, regardless of our phone number or mobile network operator. MetaTrader mobile terminal already can receive such messages right from your trading robot. You should only know MetaQuotes ID of your device. More than 9 000 000 mobile terminals have already received it.