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
Highlighting the robust possibilities of Object-Oriented Programming (OOP), insightful details and guidelines on the development of an Expert Advisor for live market simulations have been underscored. The efficient creation of viable Expert Advisors demands a keen understanding of project structure and market specificities for maximum effectiveness.

Primarily the creation of a robust, secure, and reliable code from the start is underscored, emphasizing on the indispensable role of mouse and keyboard interfaces in chart-centric applications such as MetaTrader 5.

Furthermore, the profound value of developing an Expert Advisor applicable to diverse assets without breaching server rules has been accentuated. These EAs need to simulate the experience of a trading server connection, maintaining identical rules and standards across real and simulated markets.

Technical nuances, like the ...

Read more...
❀2πŸ‘2πŸ‘2
Linear Discriminant Analysis (LDA), a supervised machine learning algorithm, finds a linear combination of features that best separate dataset classes. Similar to Principal Component Analysis (PCA), LDA targets dimensionality reduction, although in diverse circumstances each carries out effectively. The key objectives of LDA notably include maximizing class separability, minimizing within-class variability, enhancing between-class variability, effectually dealing with multiclass classification, and reducing dimensionality while preserving significant class-discriminatory information.

LDA, however, carries certain assumptions - data are independent, normally distributed within features, and classes retain the same co-variance matrix. If such assumptions are in any form violated, LDA's performance could be impacted. Its sensitivity to outliers is noted when covariance matrices are est...

Read more...
πŸ‘2πŸ‘1πŸ”₯1
Understanding the basis of a given code and its interpretations are crucial in its successful application. For those submitting Expert Advisors, ensure to name the most appropriate symbol and timeframe to optimize its usage. If submitting include files, specify their purpose such as -- for trailing procedures or calculating the size of a position to be opened.

All images attached should adhere to a standard size, preferably not exceeding 750x500 pixels. For illustrations featuring indicators or graphical objects in chart forms, consider a black and white color scheme for easy printability.

The naming convention of attached codes must be considered. Aim to use Latin letters, preferably English, for effective communication and understanding. For instance, opt for 'research.mq5' as opposed to language-specific terms like 'issledovanie.mq5', 'erforschung.mq5', 'estudio.mq5', 'ricerca.mq...

Read more...
πŸ‘5πŸ‘2
Following the detailed construction of the first class, now turns attention towards creating the C_Mouse class – a program designed to expand these high-level programming ideas and make them more useful. The aim is to keep the class code as simple to understand for other developers as possible, ensuring minimal use of complex modeling that can confuse less experienced programmers.

The C_Mouse class interacts with the user through the common mouse and keyboard inputs, aiming to keep the user-platform interaction as simple and effective as possible. A resource file is incorporated within the executable for ease of portability without separate downloads.

Simplicity in coding and their maintenance is realized through the use of definitions, where they are initially defined and later removed, avoiding unnecessary repeated declarations.

Inheritance plays a pivotal role in allowing the C_...

Read more...
Huge strides have been made in creating a structured analysis of the key aspects in forex trading - Historical Levels. Being the most recurring prices over the lifetime of a trading symbol, they directly reflect the economic conditions of a financial environment and often act as pivotal boundaries impacting price/rate movements.

Scientific analyses have documented the strong correlation of these Historical Levels to financial phases, creating a compelling case for their incorporation into a trader's market analyses toolkit. The observation that price behavior around these levels significantly influences candle shape has been exploited to predict potential price jumps.

In light of this insight, two rules have been derived, both revolving around the 'Jump Factor'. A bullish candle at the support level qualifies if 'close-low' increments beyond the jump figure. Similarly, at the resi...

Read more...
πŸ‘10πŸ‘Œ2πŸ†2πŸ‘1
Gain insightful understanding of Fourier transform, a method invaluable in decomposing a wave into its possible component parts. A tool that initially was the brainchild of Joseph Fourier, its uses have been extended to an array of applications beneficial to traders.

By integrating over an array of frequencies, the Fourier transform delivers a spectrum of components, each corresponding to a distinct frequency. The frequencies, in practice, are efficiently predetermined to a manageable number, rendering the transform formula manageable.

The modern Fourier application encapsulates n components, each with varying wave values at distinct times. The aim is to establish the components' f(t), constituting both real and imaginary parts. With this setup, it redefines any function f(t) within the interval 0 to 2 pi with complex numbers as an β€˜infinite sum’.

In practical terms, Fourier Tra...

Read more...
πŸ‘6πŸ‘2
In the realm of MQL5 and algo trading, there exists a simple yet powerful code that can be utilized for understanding volume trends. This piece of code enables the setting of two distinct groups of volume for comparison.

Take the example of a one-minute chart. Set group 1 to have 20 bars, this would present the average of the last 20 bars' volume. For group 2, set the range to accommodate the 21st to the 60th bar, providing an average over those bars. Note that setting it to 60 would equate to having 40 bars, for 60 bars, the setting should be at 80.

The next step would be the comparison process. By subtracting the average of the last 20 bars and the average of the 21st to 60th bar, the difference in volumes can be identified. To get more insight into volume increase, divide GROUP 1's average by GROUP 2's average.

This strategy offers a remarkable tool for trading breakouts or tre...

Read more...
πŸ‘7❀2✍1
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