Articles on trading system automation in MQL5

icon

Read articles on the trading systems with a wide variety of ideas at the core. Learn how to use statistical methods and patterns on candlestick charts, how to filter signals and where to use semaphore indicators.

The MQL5 Wizard will help you create robots without programming to quickly check your trading ideas. Use the Wizard to learn about genetic algorithms.

Add a new article
latest | best
What about Hedging Daily?
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.
Layman's Notes: ZigZag…
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!
Automated Trading Championship: The Reverse of the Medal
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.
How to Become a Participant of Automated Trading Championship 2008?
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.
Show Must Go On, or Once Again about ZigZag
Show Must Go On, or Once Again about ZigZag

Show Must Go On, or Once Again about ZigZag

About an obvious but still substandard method of ZigZag composition, and what it results in: the Multiframe Fractal ZigZag indicator that represents ZigZags built on three larger ons, on a single working timeframe (TF). In their turn, those larger TFs may be non-standard, too, and range from M5 to MN1.
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part  V)
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part  V)

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

In this article the author offers ways to improve trading systems described in his previous articles. The article will be interesting for traders that already have some experience of writing Expert Advisors.
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part IV)
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part IV)

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

In this article the author continues to analyze implementation algorithms of simplest trading systems and introduces recording of optimization results in backtesting into one html file in the form of a table. The article will be useful for beginning traders and EA writers.
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part III)
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part III)

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

In this article the author continues to analyze implementation algorithms of simplest trading systems and introduces backtesting automation. The article will be useful for beginning traders and EA writers.
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part II)
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Part II)

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

In this article the author continues to analyze implementation algorithms of simplest trading systems and describes some relevant details of using optimization results. The article will be useful for beginning traders and EA writers.
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization
Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization

Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization

This article dwells on implementation algorithm of simplest trading systems. The article will be useful for beginning traders and EA writers.
Using MetaTrader 4 for a Time Based Pattern Analysis
Using MetaTrader 4 for a Time Based Pattern Analysis

Using MetaTrader 4 for a Time Based Pattern Analysis

Time based pattern analysis can be used in the currency market to determine a better time to enter a trade or time in which trading should be avoided at all. Here we use MetaTrader 4 to analyze history market data and produce optimization results that can be useful for application in mechanical trading systems.
Indicator Taichi - a Simple Idea of Formalizing the Values of Ichimoku Kinko Hyo
Indicator Taichi - a Simple Idea of Formalizing the Values of Ichimoku Kinko Hyo

Indicator Taichi - a Simple Idea of Formalizing the Values of Ichimoku Kinko Hyo

Hard to interpret Ichimoku signals? This article introduces some principles of formalizing values and signals of Ichimoku Kinko Hyo. For visualization of its usage the author chose the currency pair EURUSD based on his own preferences. However, the indicator can be used on any currency pair.
Object Approach in MQL
Object Approach in MQL

Object Approach in MQL

This article will be interesting first of all for programmers both beginners and professionals working in MQL environment. Also it would be useful if this article were read by MQL environment developers and ideologists, because questions that are analyzed here may become projects for future implementation of MetaTrader and MQL.
How to Make the Detection and Recovery of Errors in an Expert Advisor Code Easier
How to Make the Detection and Recovery of Errors in an Expert Advisor Code Easier

How to Make the Detection and Recovery of Errors in an Expert Advisor Code Easier

In Export Advisors development, the questions of code errors detection and recovery are very important. The peculiarity is that a not detected in time error may ruin a precious idea of a trading system already on the stage of its first testings. That is why any sensible EA developer takes into account such problems from the very beginning. This article dwells on some approaches, helping in this difficult matter.
Trading Using Linux
Trading Using Linux

Trading Using Linux

The article describes how to use indicators to watch the situation on financial markets online.
Filtering by History
Filtering by History

Filtering by History

The article describes the usage of virtual trading as an integral part of trade opening filter.
Universal Expert Advisor Template
Universal Expert Advisor Template

Universal Expert Advisor Template

The article will help newbies in trading to create flexibly adjustable Expert Advisors.
Creation of an Automated Trading System
Creation of an Automated Trading System

Creation of an Automated Trading System

You must admit that it sounds alluringly - you become a fortunate possessor of a program that can develop for you a profitable automated trading system (ATC) within a few minutes. All you need is to enter desirable inputs and press Enter. And - here you are, take your ATC tested and having positive expected payoff. Where thousands of people spend thousands of hours on developing that very unique ATC, which will "wine and dine", these statements soundб to put it mildly, very hollow. On the one hand, this really looks a little larger than life... However, to my mind, this problem can be solved.
How to Cut an EA Code for an Easier Life and Fewer Errors
How to Cut an EA Code for an Easier Life and Fewer Errors

How to Cut an EA Code for an Easier Life and Fewer Errors

A simple concept described in the article allows those developing automated trading systems in MQL4 to simplify existing trading systems, as well as reduce time needed for development of new systems due to shorter codes.
Non-standard Automated Trading
Non-standard Automated Trading

Non-standard Automated Trading

Successful and comfortable trading using MT4 platform without detailed market analysis - is it possible? Can such trading be implemented in practice? I suppose, yes. Especially in terms of the automated trading!
How to Develop a Reliable and Safe Trade Robot in MQL 4
How to Develop a Reliable and Safe Trade Robot in MQL 4

How to Develop a Reliable and Safe Trade Robot in MQL 4

The article deals with the most common errors that occur in developing and using of an Expert Advisor. An exemplary safe automated trading system is described, as well.
Modelling Requotes in Tester and Expert Advisor Stability Analysis
Modelling Requotes in Tester and Expert Advisor Stability Analysis

Modelling Requotes in Tester and Expert Advisor Stability Analysis

Requote is a scourge for many Expert Advisors, especially for those that have rather sensitive conditions of entering/exiting a trade. In the article, a way to check up the EA for the requotes stability is offered.
Ten "Errors" of a Newcomer in Trading?
Ten "Errors" of a Newcomer in Trading?

Ten "Errors" of a Newcomer in Trading?

The article substantiates approach to building a trading system as a sequence of opening and closing the interrelated orders regarding the existing conditions - prices and the current values of each order's profit/loss, not only and not so much the conventional "alerts". We are giving an exemplary realization of such an elementary trading system.
Genetic Algorithms vs. Simple Search in the MetaTrader 4 Optimizer
Genetic Algorithms vs. Simple Search in the MetaTrader 4 Optimizer

Genetic Algorithms vs. Simple Search in the MetaTrader 4 Optimizer

The article compares the time and results of Expert Advisors' optimization using genetic algorithms and those obtained by simple search.
Expert System 'Commentator'. Practical Use of Embedded Indicators in an MQL4 Program
Expert System 'Commentator'. Practical Use of Embedded Indicators in an MQL4 Program

Expert System 'Commentator'. Practical Use of Embedded Indicators in an MQL4 Program

The article describes the use of technical indicators in programming on MQL4.
Events in МetaТrader 4
Events in МetaТrader 4

Events in МetaТrader 4

The article deals with programmed tracking of events in the МetaТrader 4 Client Terminal, such as opening/closing/modifying orders, and is targeted at a user who has basic skills in working with the terminal and in programming in MQL 4.
Orders Management - It's Simple
Orders Management - It's Simple

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

Trading Strategies

All categories classifying trading strategies are fully arbitrary. The classification below is to emphasize the basic differences between possible approaches to trading.
My First "Grail"
My First "Grail"

My First "Grail"

Examined are the most frequent mistakes that lead the first-time programmers to creation of a "super-moneymaking" (when tested) trading systems. Exemplary experts that show fantastic results in tester, but result in losses during real trading are presented.
Considering Orders in a Large Program
Considering Orders in a Large Program

Considering Orders in a Large Program

General principles of considering orders in a large and complex program are discussed.
A Pause between Trades
A Pause between Trades

A Pause between Trades

The article deals with the problem of how to arrange pauses between trade operations when a number of experts work on one МТ 4 Client Terminal. It is intended for users who have basic skills in both working with the terminal and programming in MQL 4.
MagicNumber: "Magic" Identifier of the Order
MagicNumber: "Magic" Identifier of the Order

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 "someone else's" positions (opened manually or by other experts). The article was written for users who have basic skills of working with the terminal and programming in MQL 4.
How to Use Crashlogs to Debug Your Own DLLs
How to Use Crashlogs to Debug Your Own DLLs

How to Use Crashlogs to Debug Your Own DLLs

25 to 30% of all crashlogs received from users appear due to errors occurring when functions imported from custom dlls are executed.
Working with Files. An Example of Important Market Events Visualization
Working with Files. An Example of Important Market Events Visualization

Working with Files. An Example of Important Market Events Visualization

The article deals with the outlook of using MQL4 for more productive work at FOREX markets.
Free-of-Holes Charts
Free-of-Holes Charts

Free-of-Holes Charts

The article deals with realization of charts without skipped bars.
Genetic Algorithms: Mathematics
Genetic Algorithms: Mathematics

Genetic Algorithms: Mathematics

Genetic (evolutionary) algorithms are used for optimization purposes. An example of such purpose can be neuronet learning, i.e., selection of such weight values that allow reaching the minimum error. At this, the genetic algorithm is based on the random search method.
How to Evaluate the Expert Testing Results
How to Evaluate the Expert Testing Results

How to Evaluate the Expert Testing Results

The article gives formulas and the calculation order for data shown in the Tester report.