-
Building A Candlestick Trend Constraint Model (Part 8): Expert Advisor Development (II)
Quote:
In our
previous article, we explored creating an expert advisor (EA) using the Trend Constraint V1.09 indicator, complemented by the manually executed Trend Constraint R-R script for placing risk and reward rectangles. While this setup provided insightful trading signals and enhanced visualization, it required manual intervention that could be streamlined. With the fast-paced nature of trading environments, the need for a more efficient solution becomes apparent. Many traders seek integrated systems that function autonomously, reducing the need for constant supervision and manual execution.
This article takes the next step in our series by guiding you through the development of an independent expert advisor (EA) that not only incorporates the trend analysis capabilities of Trend Constraint V1.09, but also integrates risk-reward functionalities directly into the EA. Our goal is to empower traders with an all-in-one solution using MQL5 on the MetaTrader 5 platform, offering enhanced automation and seamless operation to keep pace with market demands.
more...
-
Creating an MQL5-Telegram Integrated Expert Advisor (Part 4): Modularizing Code Functions for Enhanced Reusability
Quote:
In the
preceding article of this series, we delved into the process of sending chart snapshots with captions from
MetaTrader 5 to
Telegram. Our approach, while effective, was rather straightforward and somewhat inflexible. We chained together the components necessary to capture a screenshot, convert or encode it into a message-friendly form, and send it along to
Telegram. Although this setup worked, it resulted in a fair bit of code that was repetitive and not all that manageable. So, what can we do to improve this implementation? Move to a more modular codebase! This is the first step toward both a more flexible and a more maintainable system.
In this fourth part of our series, we will focus on enhancing the reusability of our program through code
modularization. We will undertake a detailed discussion on the principles of code modularization and, more specifically, how these principles apply to our project. Following that, we will present step-by-step instructions for reorganizing our existing mql5 script into separate, well-defined functions. In the end, you will have the choice of using the old, monolithic program or a new, modular Expert Advisor (EA) with the same output.
more...
-
Introduction to MQL5 (Part 9): Understanding and Using Objects in MQL5
Quote:
This project aims to familiarize you with the useful applications of chart objects in MQL5. This practical approach will teach you how to manage trades, improve visual analysis, and display important trading data right on your charts by efficiently integrating and modifying chart objects within your Expert Advisor (EA). To help you better understand how to use these tools for trading decisions and performance tracking, this project will walk you through the process of creating, modifying, and managing various chart objects.
more...
-
Neural Networks Made Easy (Part 87): Time Series Patching
Quote:
Forecasting plays an important role in time series analysis. Deep models have brought significant improvement in this area. In addition to successfully predicting future values, they also extract abstract representations that can be applied to other tasks such as classification and anomaly detection.
The Transformer architecture, which originated in the field of natural language processing (NLP), demonstrated its advantages in computer vision (CV) and is successfully applied in time series analysis. Its Self-Attention mechanism, which can automatically identify relationships between elements of a time series, has become the basis for creating effective forecasting models.
more...
-
Creating an MQL5-Telegram Integrated Expert Advisor (Part 6): Adding Responsive Inline Buttons
Quote:
This article dives into making our
MetaQuotes Language 5 (MQL5) Expert Advisor more responsive and interactive for users through Telegram. In the
fifth installment of this series, we laid the groundwork for our bot by implementing the ability to respond to commands and messages from Telegram and by creating custom keyboard buttons. In this segment, we’re upping the interactivity of our bot by integrating inline buttons that trigger various actions and respond dynamically to user inputs.
The article is organized to address a few key components. First, we will introduce inline buttons in
Telegram bots, including what they are, their usefulness, and the benefits they provide over other methods of creating a bot interface. Then, we will transition to discussing how to use these inline buttons in MQL5, so that they can be part of our Expert Advisor's user interface.
more...
-
Neural Networks Made Easy (Part 88): Time-Series Dense Encoder (TiDE)
Quote:
Probably all known neural network architectures have been studied in terms of their ability to solve time series forecasting problems, including recurrent, convolutional and graph models. The most notable results are demonstrated by models based on the
Transformer architecture. Several such algorithms were also presented in this series of articles. However, recent research has shown that
Transformer-based architectures might be less powerful than expected. On some time series forecasting benchmarks, simple linear models can show comparable or even better performance. Unfortunately, however, such linear models have shortcomings because they are not suitable for modeling nonlinear relationships between a sequence of time series and time-independent covariates.
more...
-
MQL5 Wizard Techniques you should know (Part 40): Parabolic SAR
Quote:
We stick to this format for this article, where we go over pattern by pattern for the parabolic SAR before concluding with a test run that combines multiple patterns as we did in the last articles. The parabolic SAR is computed almost independently with each new bar, since some of the parameters that go into its formula need to be adjusted, as we will see below. This trait, though, makes it very sensitive to price changes and trends in general, which in turn makes the case for its use within a custom signal class. For this article, we are going to explore 10 separate patterns of this indicator by testing each independently and then concluding, as in the recent articles, with a test run that combines a selection of these patterns.
more...
-
Creating an MQL5-Telegram Integrated Expert Advisor (Part 7): Command Analysis for Indicator Automation on Charts
Quote:
In this article, we will build on the progress made in the
previous part (Part 6), where we integrated responsive inline buttons to enhance bot interaction. Now, our focus shifts to automating the addition of indicators on
MetaTrader 5 charts using commands sent from Telegram. We will create a system where the Expert Advisor captures user-defined indicator parameters via
Telegram, parses the data, and applies the specified indicators to trading charts in real-time.
more...
-
Building A Candlestick Trend Constraint Model (Part 9): Multiple Strategies Expert Advisor (I)
Quote:
From the beginning of this article series, our emphasis has been on aligning our experts with the prevailing sentiment of the daily (D1) candles. The shape of the daily candle has served as the primary guiding feature. However, we needed to scale down to lower timeframes to identify entry levels within the D1 market. For example, at the M1 timeframe, we wanted the market to reach extreme levels on the Relative Strength Index (RSI) to signal potential trades for the Expert Advisor. At this early stage, we did not introduce too many strategies to keep the content easy to understand for beginners.
However, there is a vast collection of strategies to study and integrate into the algorithm of our Trend Constraint Expert Advisor. Today, we will take a close look at some well-known strategies developed by influential figures in trading, whom I refer to as the "Market Fathers."
more...
-
MQL5 Wizard Techniques you should know (Part 42): ADX Oscillator
Quote:
The
ADX indicator is an oscillator that is meant to measure how strong a given trend in the market is for the security to which it is attached. This article thus, like some that were preceding it, examines the various patterns exhibited by this indicator in a custom signal class file, for wizard assembled Expert Advisors. We review one pattern at a time as we have in the previous articles covering RSI, Bollinger Bands, and the RSI and then conclude with a test that includes all patterns to get a sense of which has the highest weighting.
more...
-
Creating a Trading Administrator Panel in MQL5 (Part IV): Login Security Layer
Quote:
Security is paramount in any field of expertise, and we cannot afford to overlook its importance. With the persistent threat of unauthorized access, it’s crucial to safeguard our Admin Panel from potential intruders. If unauthorized individuals gain access, they could easily manipulate the panel and jeopardize our communication efforts with the broadcast community. The primary purpose of this system is to facilitate reliable communication, and while we can enhance functionality at the Expert Advisor level, the risks of intrusion remain significant.
more...
-
Neural Networks Made Easy (Part 90): Frequency Interpolation of Time Series (FITS)
Quote:
In the previous articles, we discussed the
FEDformer method that uses the frequency domain to find patterns in a time series. However, the
Transformer used in that method can hardly be referred to as a lightweight model. Instead of complex models that require large computational costs, the paper "
FITS: Modeling Time Series with 10k Parameters" proposes a method for the frequency interpolation of time series (
Frequency Interpolation Time Series - FITS). It is a compact and efficient solution for time series analysis and forecasting.
FITS uses frequency domain interpolation to expand the window of the analyzed time segment, thus enabling the efficient extraction of temporal features without significant computational overhead.
more...
-
Building A Candlestick Trend Constraint Model (Part 9): Multiple Strategies Expert Advisor (II)
Quote:
In the 20th century, Richard Donchian established a trend-following strategy through his studies of financial markets, which later evolved into the Donchian Channels. We briefly discussed his work in a previous article, but today we will focus on implementing the strategies associated with his theory. According to various sources, the channels are believed to encompass multiple strategies within their framework. The abundance of literature on Donchian Channels suggests the continued effectiveness of this theory in modern-day trading. By integrating Donchian Channel strategies, we aim to expand the opportunities for our Trend Constraint Expert, enhancing both its profitability and adaptability to diverse market conditions.
more...
-
Price Action Analysis Toolkit Development (Part 1): Chart Projector
Quote:
In this article, titled "The Chart Projector," we focus on developing a tool designed to simplify market analysis, particularly for price action traders. The Chart Projector overlays the previous day's chart onto the current one in a ghost mode representation.
more...
-
Data Science and ML (Part 32): Keeping your AI models updated, Online Learning
Quote:
Online machine learning is a machine learning method in which the model incrementally learns from a stream of data points in real time. It’s a dynamic process that adapts its predictive algorithm over time, allowing the model to change as new data arrives. This method is incredibly significant in rapidly evolving data-rich environments such as in trading data as it can provide timely and accurate predictions.
more...
-
Price Action Analysis Toolkit Development (Part 3): Analytics Master — EA
Quote:
Having developed the analytic comment script in the previous episode, I have identified its limitations regarding script properties, which I will outline below. While I acknowledge the considerable impact that the analytical comment script has had within the trading community, I have developed an Expert Advisor (EA) called Analytics Master. This EA offers the same analysis while also providing extra metrics for better trading insights. This new tool offers several advantages, including the ability to continuously update metrics every two hours, in contrast to the script, which could only write metric information once. The EA enhances analysis and keeps users updated.
more...
-
Introduction to MQL5 (Part 10): A Beginner's Guide to Working with Built-in Indicators in MQL5
Quote:
We will be developing a Relative Strength Index (RSI) EA in this article. One of the most used technical indicators in trading is the RSI. We'll build a tool that tracks market conditions and makes trades automatically by including this indicator in our EA. Although the Relative Strength Index (RSI) is the subject of this article, the ideas we'll discuss apply to most built-in indicators because they all operate on similar principles. Since this series is intended mostly for beginners, my main goal will be to keep the explanations and code as straightforward as possible. I know that for a novice, it is crucial to fully comprehend every stage of the process, including why certain code is written, what each component performs, and how the various parts work together.
more...
-
Price Action Analysis Toolkit Development Part(4): Analytics Forecaster EA
Quote:
In this article, we will focus on integrating our broadcast with Telegram to ensure wider access to analyzed information. I chose Telegram for this purpose due to its popularity and accessible interface among traders. Integrating MetaTrader 5 chart updates with Telegram offers significant advantages for active traders. This setup provides immediate access to crucial market information, enhances the user experience, and improves communication. Consequently, you can develop more effective strategies and respond swiftly in a rapidly changing market. With this integration, you can increase your chances of success and make more informed, timely decisions.
more...
-
How to build and optimize a volume-based trading system (Chaikin Money Flow - CMF)
Quote:
Welcome to a new article where we explore new indicators in terms of creating them, building trading systems based on their concept, and optimizing these systems to get better insights and results regarding profits and risks. In this article, we will introduce a new volume-based technical indicator called the Chaikin Money Flow (CMF) indicator.
more...
-
Neural Networks Made Easy (Part 97): Training Models With MSFformer
Quote:
In the previous article we built the main modules of the
MSFformer model, including
CSCM and
Skip-PAM. The
CSCM module constructs a feature tree of the analyzed time series, while
Skip-PAM extracts information from time series at multiple scales using attention mechanism based on a temporal feature tree. In this article, we will continue that work by training the model and evaluating its performance on real-world data using the MetaTrader 5 Strategy Tester.
more...
-
Neural Networks in Trading: Piecewise Linear Representation of Time Series
-
Developing a Calendar-Based News Event Breakout Expert Advisor in MQL5
Quote:
Volatility tends to peak around high-impact news events, creating significant breakout opportunities. In this article, we will outline the implementation process of a calendar-based breakout strategy in MQL5. We'll cover everything from creating a class to interpret and store calendar data, developing realistic backtests using this data, and finally, implementing execution code for live trading.
more...
-
Introduction to MQL5 (Part 12): A Beginner's Guide to Building Custom Indicators
Quote:
Using a project-based approach, we will divide the process into two main parts. First, without utilizing the iMA function, we will build a Moving Average indicator entirely from scratch. Next, we'll go one step further and transform the Moving Average from the conventional line shape into a candle-style indication. In addition, this practical method will open up new avenues for developing trading tools that are specifically suited to your requirements.
more...
-
From Basic to Intermediate: Arrays and Strings (I)
Quote:
In the previous article, "
From Basic to Intermediate: Operator Precedence", we talked a little about the precautions we should take when using factorization in our codes. It's not uncommon to come across code that appears correct at first glance but ends up producing completely unexpected results in certain situations. This type of issue is often directly related to how the factorizations are implemented. Getting a piece of code to deliver consistent results may seem like a trivial task. However, without the proper knowledge (as demonstrated in that article), the likelihood of catastrophic failures increases as more and more poorly implemented factorizations are introduced into the code.
more...
-
Neural Networks in Trading: Controlled Segmentation
Quote:
The proposed Object Cluster Module plays a crucial role in enabling the model to achieve a deeper, more holistic understanding of both linguistic and visual information.
more...
-
Price Action Analysis Toolkit Development (Part 27): Liquidity Sweep With MA Filter Tool
Quote:
In this article, we will develop an MQL5 Expert Advisor designed to identify liquidity sweeps as they unfold. The EA begins by analyzing candles that break below or above previous swing points, then close back within the range, indicators of potential liquidity absorption. It incorporates optional filters, such as candlestick color changes or moving average confirmations, to ensure the signals align with your market bias. When a valid pattern is detected, the EA visually marks it on the chart with arrows or labels and generates an alert.
more...
-
Installing MetaTrader 5 and Other MetaQuotes Apps on HarmonyOS NEXT
Quote:
Huawei users running HarmonyOS NEXT can now easily install and use MetaTrader 5, MetaTrader 4, and other MetaQuotes applications. This is possible thanks to DroiTong, a compatible tool available in the Huawei AppGallery that enables you to run Android apps on HarmonyOS NEXT. This guide will walk you through the straightforward process of getting these essential applications up and running on your device.
more...
-
MQL5 Wizard Techniques you should know (Part 78): Using Gator Oscillator and the Accumulation/Distribution Oscillator
Quote:
In our last article we introduced 5 signal patterns from the pairing of the Gator and the Accumulation/Distribution oscillators, in this article we consider the final 5 of this set of 10. We have been looking at 10 signal patterns for each indicator pairing, and we will be maintaining this format. From the testing in the last article which was done on the pair GBP JPY on the 30-minute timeframe, our results indicated that the patterns 0, 3, and 4 struggled to forward walk, however before we can choose what to improve with supervised learning, let's complete examining and testing of patterns 5 to 9.
more...
-
Demo trading taught me more about timing and discipline than any book ever could. Both basic knowledge and demo practice are essential - and combining theory with real‑market practice is a cornerstone of my own journey