MQL5 Algo Trading
391K subscribers
2.58K photos
2.58K links
The best publications of the largest community of algotraders.

Subscribe to stay up-to-date with modern technologies and trading programs development.
Download Telegram
The ElectroMagnetism-like (EM) algorithm, a metaheuristic search algorithm, simulates the behaviour of electromagnetic particles to solve non-linear optimization problems. Guided by electromagnetism theory, EM uses attraction-repulsion mechanisms to attain global optimal solutions. The algorithm primarily involves forming solution populations, calculating electromagnetic forces between solutions, updating solution populations, and establishing stop conditions. Despite its potential, EM showed subpar performance in tests but outperformed some powerful algorithms on the Rastrigin function test with 1000 parameters.

Read more...
πŸ‘1
Trading experts understand the significance of setting the Take Profit (TP) and Stop Loss (SL) parameters in the course of their activities. Our advanced tool innovation brings an extra layer of strategic implementation in setting these parameters.

The Expert, keyed into this concept, operates such that TP is set based on the SL pre-determined manually. This is made possible through an input multiplier allowing the configuration to be 2, 3, 4 times and so forth the original SL set.

This systematic approach to trading approach substantiates the importance of strategic TP and SL setting in the face of unpredictable market dynamics, offering seasoned traders an additional avenue to optimize their trading strategy. Maintain market edge and viability with this innovative tool, as it continues to redefine trading execution in this era where details matter.

Read more...
πŸ‘9❀1
Revisiting the previous focus on Decision Transformer methods and autoregressive models, the performance of the model tends to decrease following initial profitability. This drawback could potentially be mitigated through periodic additional training; however, this inherently complex method would benefit from online model training.

February 2022 saw the introduction of the Online Decision Transformer, a derivative of the classic Decision Transformer. Noteworthy is the fact that the ODT is capable of competing with benchmark performances and even improving during fine-tuning. Its algorithm is influenced by the K hyperparameter that defines the context length and the interplay between exploration and exploitation.

Several distinct features mark out the ODT's algorithmic architecture, including the probability of the maximization of trajectory repeats and an auto-regressional model of...

Read more...
❀1
In an effort to enhance code comprehension, notably for beginners, it’s key to bring programming closer to natural language. Offering detailed context on the evolution of coding languages from binary to assembly languages and now to higher-level languages, this journey has incrementally pushed machine language closer to human language. One such example of the latter is MQL5, bearing similarities to C/C++.

Undeniably programming for other programmers simplifies the process, ensuring easier maintainability and upgradeability especially as codes become increasingly complex. A more readable and understandable code will inevitably reduce errors and amplify efficiency. A key amplification of this principle is the Defines.mqh file. It encapsulates definitions within syntax enabling a more human-readable code, even allowing programming enthusiasts to grasp basic ideas without fully understan...

Read more...
❀2πŸ‘1
Circulating among the digital spheres is a video link worth taking a look at. The video is a well-detailed and insightful demonstration of modern coding techniques and practices. Its contents revolve around the implementation of user-friendly software applications, backed by versatile coding languages and rock-solid data security.

The digital landscape is continually changing, and staying updated is a necessity, not a choice. This material provides an excellent opportunity for developers and programmers to stay abreast of the latest trends and technological advancements in the field.

The video promises to share methodologies that streamline time-consuming tasks. It effectively demonstrates how to approach complex programming needs and construct powerful applications for today's demanding users.

A note for interested viewers: Extracting the maximum value from the video requires focu...

Read more...
πŸ‘4❀2
The SAR ADX Signal has been revamped from its MT4 version. The original source no longer exists. This indicator, now available with mobile notification, warrants careful usage as it possesses the characteristic of repainting. The effective management of this feature is of utmost importance for optimal results. Stay informed with mobile notifications, but approach with caution given its repaintable nature.

Read more...
πŸ‘7✍2🀝1
A detailed exploration of implementing time series data in neural networks provides crucial insight into the hallmark of successful trading systems. Notably, setting the parameters accurately has a significant impact on the output, a factor often overlooked leading to distorted and less desirable results.

Valuable concepts such as 'Distances' take into account the space between different indicators. For instance, when direct input parameters like the value of the MA 1 indicator are passed to the system, the values exhibit an irregular spread over time, thus creating a statistical anomaly with vast ranges. However, if the difference between two indicators is passed, with examples being MA 1 and MA 100, or the value of the MACD indicator now versus its value four candles ago, the system can comprehend whether the market is extensively oversold or overbought compared to present insight...

Read more...
❀1
Developing a personalized MT4/MT5 indicator for self-use or clientele is now simpler than ever. By integrating three lines of code into the MQL4/MQL5 file, scope for an indicator's functionality can be broadened exponentially.

With this upgrade, the indicator can establish a connection with Telegram, dispatch messages and signals to the platform, and even entertain trade instructions from the application. Furthermore, the incorporation of trading capabilities to an indicator (open, close and managing positions), transforms it into a multi-dimensional tool.

Once operational within the "eco-system", the indicator can easily attach to multiple charts across diverse pairs and timeframes. While it exhibits the potential to detect numerous trading opportunities every day, the absence of trading constraints makes it an unprecedentedly dynamic entity.

The challenge lies in transforming t...

Read more...
❀5πŸ‘1
The efficiency of model operation in AI technologies is directly related to the data formats used. Recent developments have introduced new data formats such as float16 and float8 for deep learning models optimization. These formats are gaining popularity in modern ONNX models due to their balance between performance and accuracy, making them ideal for various machine learning tasks. This article outlines key advantages and characteristics of float16 and float8 formats and demonstrates functions for converting them to standard float and double formats. This knowledge will be beneficial for developers and researchers keen on effective utilization of these formats in their models. The article also covers the operation of the ESRGAN ONNX model, illustrating image quality enhancement possibilities.

Read more...
The TimeGMT function enables correct GMT representation using local system data. Primarily used for session hours adjustments in trading activity, the TimeGMT function factors in the Daylight Savings Time (DST) adjustments. However, while testing in the strategy tester, discrepancies occur as TimeGMT equals TimeTradeServer, causing miscalculations.

To overcome this, a TimeGMT library has been developed to rectify the function for accurate GMT during strategy testing. It relies on macro substitution in the TimeGMT function to address gaps in test and live run scenarios.

In practical usage, the fix is applied only when a strategy tester is detected, working on the selected symbol and timeframe in the strategy tester. It also ensures that no calculation errors occur during weekends or public holidays, providing a low overhead and swift computation time.

To illustrate the library, a de...

Read more...
❀4⚑1πŸ‘1πŸ‘1
Discover the power of MetaTrader 5's export and import functions and elevate programmatic exchange beyond average standards. Its capacity to save rates and ticks from or to the 'Symbols' dialogue is especially notable. Keep in mind, however, some restrictions might affect tick export, possibly excluding portions of the required history.

To address this challenge, MetaTrader 5 makes use of a script which exports any part of the desired history into a compatible CSV-format. This aligns seamlessly with the standard procedures for data export and import. Moreover, the script operates based on the current chart's symbol, retaining its array of rates and ticks over a specified date range into two separate CSV-files.

The convenience doesn't stop at data extraction. Indeed, the files, saved in the MQL5/Files folder, have identifiers attached. The file names will carry the symbol name, the ...

Read more...
πŸ‘11❀2πŸ‘1
Continuing on with insights from the previous article on EA automation, a fundamental observation was illuminated: the possibility of a system malfunction exists, no matter how remote. This factor necessitates measures to minimize potential damage or side effects. It stands to emphasize that creating a 100% automated EA is not a simple task. The goal has never been to obtain a 'foolproof' system devoid of supervision. In fact, that flawed perception about automatic EAs, that they're "set it and forget it", is misguided. As automation increases, complexity and gravity of potential errors amplify. Runtime errors can arise and must be managed in real time, which when coupled with potential system vulnerabilities, create a tiring demand on supervising staff. Always consider some salient points of potential problems, casings shadow even in a seemingly 'perfectly' running system.

The proce...

Read more...
πŸ‘7πŸ”₯1
Assistance is at hand to guide you through the process of modifying the TP/SL for all ongoing orders. This is done by configuring the TP/SL according to the percentage value introduced. Important guidelines to consider:

The TP/SL alteration should be performed precisely only when all ongoing orders are related to the same symbol. Adjust the leverage as specified in the expert advice given. The leverage value is entered as follows (for instance, 1:200 translates to 0.5, 1:100 correlates with 1, 1:400 converts to 0.25).

Further, to load the chart of the specific symbol, employ the expert's instructions. It's essential to be mindful regarding the intricate details in order to ensure smooth processing. The expertise available provides a solid foundation for synthesizing knowledge and executing tasks.

Read more...
❀5πŸ‘4
Meet our new book: "Neural Networks for algorithmic trading in MQL5". Learn how to use AI in trading robots for the MetaTrader 5 platform. The author, Dmitry Gizlyk, is a professional developer who has written around a hundred of articles on neural networks.

Now, with the support of MetaQuotes, all his valuable knowledge is conveniently collected in one book. It gradually introduces the reader to neural network basics and their application in algorithmic trading. You will learn how to create your own AI application, train it and extend its functionality.

The book is freely available online, under the NeuroBook section of the MQL5 Algo Trading community website.

Read more...
πŸ‘8❀3πŸ‘3πŸ”₯2
The article takes an in-depth look at the practical use of quantization in creating tree models, without overuse of complex mathematical equations. Navigating through differing terminologies used by various researchers, it aims to select words that best convey the concept.
The piece provides readers with theoretical groundwork on quantization, a discussion on the uniform quantization method referencing MQL5 code and exploration of the application of the quantization process using CatBoost. This will prove beneficial for better understanding the goals and details of the process.
The article accentuates standard practices of data accumulation for model training. The accumulated data ranges from binary to quantitative indicators. It also underscores that the observations recorded can provide a comprehensive or a partial overview of the observed phenomenon.
Additionally, the piece provid...

Read more...
Presenting "Benchmark.mqh," an include file housing multiple macros designed for benchmarking execution speeds of various functions. The goal is to determine the speediest function, aiding in optimization practices. This library bases its architecture on public source codes, notably those of Python's 'timeit' module and C# 'Stopwatch' class.

The Python timeit module's link for reference: [Python timeit module](https://docs.python.org/3/library/timeit.html)
C# Stopwatch Class reference link: [C# Stopwatch Class](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch)

Providing an example script for usage below, aiding practitioners in effectively using the library to maximize function performance. Further practical examples and usage guides will follow. Stay updated to optimize productivity through precise, time-efficient benchmarking.

Read more...
πŸ‘6❀3
MetaTrader 5 users, get ready to level up! Discover how custom indicators in MQL5 can provide powerful insights, beyond the usual price action. Learn how to create the True Strength Index Indicator from square one, gaining insights that are hard to detect with strictly numerical analysis.

Moreover, the indicator can also be integrated into a trading system by creating an Expert Advisor. This tool allows you to interpret, calculate and code the True Strength Index indicator, optimized for use on the MetaTrader 5 platform - a winning edge for any trading strategy.

Make no mistake, this is not just about creating custom indicators, but also implementing them in trading systems and EAs. Practice coding the material independently for the maximum learning uptake. Familiarize yourself with the MetaTrader 5 IDE if needed, prior to coding the content to ensure smooth handling.

A guiding no...

Read more...
πŸ‘5❀1πŸ‘1
Monitoring and maintaining profitable trades require meticulous measures. An Expert Advisor (EA) tool has been introduced that simplifies this process. Equipped with a mechanism that calculates the existing account balance, it formulates decisions based on the specified risk and profit percentages of the user.

For an increased understanding, one sell position is regulated at once in P_pro. The intent: to provide an effective demonstration of the EA's operations. Note that this feature tentatively exists, and has been eliminated in the money management mq5.

This sophisticated tool simplifies position management, catering particularly to those who favor this method. Highlighting scheduling flexibility, it enables closing trades either in profit or in loss. Feedback is welcomed. Please report any identified bugs or issues. Worth noting, this EA tool is an integral part of comprehensi...

Read more...
πŸ‘9❀2πŸ”₯2πŸ‘1
Understanding the importance of special/unique domains is pivotal to leveraging predictive power in price volatility for traders. The concept of multi-domains, a generalization of domains, welcomes the replication of elements capturing all necessary metadata. They prove substantial in delineating intricate relationships in trading practices.

Consider the scenario of a multidomain accommodating multiple data points, or in some instances, a singular data point. When the homomorphism set represents a multidimensional domain, there are bound to be identical elements in the source domain. For the codomain, normalization of data points ranging from -100 to +100 enables unique representation. The possibilities become limitless when considering multi-faceted parameters coupled with today's robust computational capabilities.

The leverage of relative-domains is not extensively covered, despit...

Read more...
❀7πŸ‘2πŸ‘1πŸ‘Œ1πŸ‘€1
Recognizing the complexity and time consumption involved in using built-in functions of the SQLite database for storing simulation-generated statistics, a simplified class has been innovated. The goal is to avail of seamless, efficient data storing and extraction for developers. This developer-centric solution only requires the inclusion of the file in the code, followed by calling the database object using databases.xxxxfunction_name(). The efficacy of this approach has proven itself, successfully saving and extracting thousands of data points with ease. The innovation paves the way for a more streamlined experience working with SQLite databases.

Read more...
πŸ‘3πŸ‘1
An ongoing article series on the development of a multi-currency Expert Advisor currently witnesses the addition of source codes from new articles to its library. It's advised to review the code chronologically as per the publication of articles for a more streamlined understanding of the development progression and updates incorporated.

The article series serves as a detailed guide on multi-currency Expert Advisor creation. It begins with the inaugural part illustrating the benefits of using several parallel strategies implemented within one Expert Advisor for better risk diversification and sustainability.

The second part delves into transferring all operations related to market position openings from the strategy level to the expert management level, thereby enabling strategies to trade virtually sans real market position openings.

The third part involves a detailed walkthrou...

Read more...
πŸ‘8πŸ‘2