MQL4 and 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
preview
Exploring Machine Learning in Unidirectional Trend Trading Using Gold as a Case Study

Exploring Machine Learning in Unidirectional Trend Trading Using Gold as a Case Study

This article discusses an approach to trading only in the chosen direction (buy or sell). For this purpose, the technique of causal inference and machine learning are used.
preview
From Basic to Intermediate: Events (II)

From Basic to Intermediate: Events (II)

In this article, we will see that not everything always needs to be implemented in a certain specific way. There are alternative approaches to problem-solving. To properly understand this article, it is necessary to grasp the concepts described in the previous articles. The materials presented here are for educational purposes only. They should not be considered as a final application, the goal of which is not to study the concepts presented here.
preview
Exploring Machine Learning in Unidirectional Trend Trading Using Gold as a Case Study

Exploring Machine Learning in Unidirectional Trend Trading Using Gold as a Case Study

This article discusses an approach to trading only in the chosen direction (buy or sell). For this purpose, the technique of causal inference and machine learning are used.
preview
Using Deep Reinforcement Learning to Enhance Ilan Expert Advisor

Using Deep Reinforcement Learning to Enhance Ilan Expert Advisor

We revisit the Ilan grid Expert Advisor and integrate Q-learning in MQL5 to build an adaptive version for MetaTrader 5. The article shows how to define state features, discretize them for a Q-table, select actions with ε-greedy, and shape rewards for averaging and exits. You will implement saving/loading the Q-table, tune learning parameters, and test on EURUSD/AUDUSD in the Strategy Tester to evaluate stability and drawdown risks.
preview
Integrating Computer Vision into Trading in MQL5 (Part 1): Creating Basic Functions

Integrating Computer Vision into Trading in MQL5 (Part 1): Creating Basic Functions

The EURUSD forecasting system with the use of computer vision and deep learning. Learn how convolutional neural networks can recognize complex price patterns in the foreign exchange market and predict exchange rate movements with up to 54% accuracy. The article shares the methodology for creating an algorithm that uses artificial intelligence technologies for visual analysis of charts instead of traditional technical indicators. The author demonstrates the process of transforming price data into "images", their processing by a neural network, and a unique opportunity to peer into the "consciousness" of AI through activation maps and attention heatmaps. Practical Python code using the MetaTrader 5 library allows readers to reproduce the system and apply it in their own trading.
preview
Larry Williams Market Secrets (Part 10): Automating Smash Day Reversal Patterns

Larry Williams Market Secrets (Part 10): Automating Smash Day Reversal Patterns

We implement Larry Williams’ Smash Day reversal patterns in MQL5 by building a rule-based Expert Advisor with dynamic risk management, breakout confirmation logic, and one trade at a time execution. Readers can backtest, reproduce, and study parameter effects using the MetaTrader 5 Strategy Tester and the provided source.