MQL5 Algo Trading
389K subscribers
2.57K photos
2.57K 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
Understanding an enhanced indicator tool can significantly aid in trading strategy refinement. This update is based on the Time Segenerated Volume (TSV) originally by Worden Brothers, Inc. A key addition to this tool is the freedom to select different pricing points, rather than being constrained to the close price typically used. Additionally, users have options in volume weighting, including a technique based on a true range and an option to forego volume weighting altogether.

The indicator incorporates two types of moving averages: the original simple moving average and a newly integrated exponential moving can be activated depending on preference, which offers quicker responsiveness to market changes. The coding is versatile, designed for compatibility with both MQL4 and MQL5 environments.

For developers and traders interested in accessing the source code, it's available under '...

Read more...
πŸ‘20❀5πŸ‘5⚑2πŸ‘Œ2
Understanding causal inference in the context of trading is an intricate yet vital aspect of developing robust predictive models. Recently, the focus has been on the use of propensity score matching (PSM), a technique predicated on the ability to estimate the average causal effect (ACE) even when data exhibits inherent biases due to variable treatments across a heterogeneous sample.

PSM addresses challenges particularly present in environments like Forex trading where market volatility significantly affects the data distribution in training sets. This method involves matching datasets with similar propensity scores, which are estimates of the probability of receiving a particular treatment given their baseline characteristics. By aligning units from both the treatment and control groups that share similar scores, PSM seeks to neutralize the effect of confounding variables, thus ensur...

Read more...
πŸ‘6✍5πŸ”₯1πŸ‘1
In the realm of custom scripting with external libraries, understanding the use of "user32.dll" can enhance application interfaces significantly. A brief script tutorial demonstrates how to leverage this DLL in several steps.

1. Start by importing the DLL and its essential functions.
2. Utilize `FindWindowW` to acquire the handle of a parent alert dialog, pinpointing the specific parent window handle crucial for interaction.
3. Further, use `FindWindowExW` to obtain the handle of a child window component, such as a textbox or label, within the dialog. This specifies the process by identifying the child window handle.
4. Extract content from the textbox, ensuring to define the string length before extraction to avoid errors.

This methodical approach to using external libraries like "user32.dll" allows for deeper customization and control over Windows GUI elements, facilitating more d...

Read more...
πŸ‘14❀4πŸ‘2
In the latest installment on developing a modular replay system, the focus shifts to enhancing communication between processes using an EA and an indicator, with scope for further expansion. The segmentation into modules allows for individual updates or modifications without impacting the broader system, making it more efficient and secure compared to using global terminal variables.

Efforts are made to transform an EA-based system into one that operates on an indicator, which aligns with the system’s upcoming enhancements. This transition includes modifying code within the InterProcess.mqh and C_Study.mqh files to facilitate seamless data transfer and interaction. These code adjustments are geared to ensure the indicator functions efficiently within its environment, handling inter-process communications without hindering the performance of other operations on the chart.

Understand...

Read more...
πŸ‘15❀6πŸ†2πŸ‘€2πŸ‘1
The indicator in discussion employs a calculating method based on the principles of Linear Regression Value. For those interested in a deeper understanding, it is recommended to refer to the detailed explanation provided in the related post. The calculation of this linear regression line utilizes the exact function outlined in the previously mentioned link, ensuring consistency in the methodological approach. This precision in calculation aids in delivering reliable predictions and trends within the dataset being analyzed.

Read more...
πŸ‘14πŸ‘2πŸ†2❀1
Understanding the application of Linear Regression in trading algorithms can significantly enhance trading strategy development. This particular indicator utilizes the Linear Regression Value method, which is detailed extensively in a dedicated post on the subject. For developers and programmers working in the financial technology sector, leveraging such mathematical models is crucial for designing predictive algorithms that are both robust and efficient. The method discussed is used specifically to compute the slope of the linear regression, which can provide insightful data trends in market analysis. For those interested in implementing or refining their trading algorithms, a thorough understanding of this method is recommended.

Read more...
πŸ‘12πŸ”₯3πŸ‘1
Efficiency in coding has always been a critical aspect of software development. In a notable instance concerning linear regression calculations, a coder known as "mathemat" developed a streamlined formula for these calculations: `3*lwma - 2*sma`. This formula, utilizing lightweight moving average (LWMA) and simple moving average (SMA), both optimized for what is referred to as "loop less mode," offers an expedited approach to compute linear regression values accurately.

Although this method is efficient, it omits two crucial aspects found in the traditional linear regression calculations: the intercept and the slope of the regression line. Recognizing the importance of these components, an alternative approach has been proposed. This new method still adheres to the loop less mode for efficiency but incorporates both the intercept and the slope, ensuring a more comprehensive analysis....

Read more...
πŸ‘22❀4πŸ‘1πŸ‘Œ1
In the latest installment of our series on MQL5 and RestAPI, we focus on transitioning from a procedural approach to using object-oriented programming (OOP) to enhance code management and efficiency. OOP helps in organizing functions into classes, making the software easier to maintain and expand.

OOP principles like encapsulation enhance modularity, allowing related functions and variables to be grouped together. This structure reduces errors and simplifies maintenance. In MQL5, converting existing procedural code into class-based code promotes code reusability across different parts of the project or future projects.

Changes discussed include the creation of interfaces like IHttpRequest and IHttpResponseProcessor, which establish a framework for classes. Concrete classes such as HttpRequest and HttpResponseProcessor implement these interfaces, encapsulating the handling of HTTP re...

Read more...
πŸ‘11❀3πŸ‘3πŸ€”3✍1
In the realm of technical analysis, not all indicators facilitate the application to another indicator's data, especially in environments governed by specific platform constraints. A useful case in point is the linear regression line, which traditionally leverages simple price data. An enhanced version of this is now presented that allows application to data from other indicators, extending its utility.

Moreover, unlike the regression channel which requires manual adjustments to align with new bars, this updated linear regression line adjusts automatically, streamlining its use in dynamic market conditions. Additionally, this version offers a feature where the line color changes based on the slope, providing visual cues about trend direction and momentum, thus aiding in more nuanced analysis and decision-making processes in trading strategies. This adaptation marks a significant impr...

Read more...
πŸ‘20❀14πŸ‘2πŸ”₯1😁1
Expanding accessibility and integration on the MetaTrader 5 platform, developers now have enhanced capabilities to utilize WhatsApp for effective signal notifications. This improvement is a part of ongoing upgrades to make trading signals accessible via popular platforms such as WhatsApp, thanks to its new channel feature aimed at reaching a broader audience.

The integration process includes configuring a Messaging API and modifying the Trend Constraint Indicator to send notifications through WhatsApp. This setup is detailed in a newly introduced flowchart which outlines critical stages, ensuring developers can replicate or adapt the process efficiently.

Security has been a paramount consideration, with stages including rigorous testing and debugging to safeguard the application from potential vulnerabilities common with DLL files, such as malware risks and version conflicts.

Comp...

Read more...
πŸ‘13πŸ”₯8❀7✍2πŸ‘1
In the technical development of the Replay System, specifically in article "Developing a Replay System (Part 40): Starting the second phase (I)", the focal point shifted towards enhancing the integration and functionality of the mouse within the trading environment through a custom indicator. The evolution introduces a methodology to streamline coding practices and reduce redundancy across different sectors of development.

The modification of the C_Mouse class is vital as it serves as a hinging mechanism between user interaction and system response. This evolution emphasizes on refining the interaction with the mouse pointer, finalizing the indicator for an extended period without further alterations, promising stability and consistency in its application.

In subsequent phases, elements from the C_Study class are strategically moved to streamline the C_Mouse class, focusing on simpl...

Read more...
πŸ‘7❀6✍2
In the rapidly evolving field of trading technology, the implementation of multi-timeframe strategies within wizard-assembled Expert Advisors (EAs) offers significant potential but also presents certain limitations. Testing across multiple timeframes in custom-built trading algorithms can prove complex, primarily due to the customization required for each signal during the wizard assembly stage. It is vital to note that customization of symbol names and timeframes should be addressed during the wizard signal selection phase rather than post-selection.

This technique allows traders to seek divergence opportunities and setup confirmations across various timeframes, enhancing trading strategies. Furthermore, the integration of quadratic means (QM) or root-mean-square in trading strategies focuses on the larger values in a set, which differs from the approach of geometric and harmonic m...

Read more...
πŸ‘17❀2πŸ‘2⚑1πŸ€”1
Recurrent Neural Networks (RNNs) are designed to process sequential data and are particularly well-suited for applications like time series forecasting, language modeling, and more. RNNs differ from traditional feedforward neural networks because they use their internal state (memory) to process sequences of inputs. This functionality makes them ideal for tasks where the order of data points is crucial.

The architecture of a simple RNN allows it to handle not just sequences of data but also to capture temporal dependencies that are integral for understanding patterns over time. For example, when used in financial markets forecasting, RNNs can predict future market movements based on historical data. However, they do have limitations, such as difficulty learning long-range dependencies due to the vanishing gradient problem, which has been somewhat mitigated by advanced versions like L...

Read more...
❀9πŸ‘8πŸ”₯2πŸ‘1
Samy Thuillier, a trader specializing in Forwards, Warrants, and Turbos, offers some specific recommendations for managing trading positions. Key among these is the caution against holding directional positions to avoid potential losses during market reversals. He strongly advises traders to focus solely on intraday transactions and avoid holding positions overnight, emphasizing the importance of minimizing risks associated with significant market shifts that could occur beyond regular trading hours. These strategies are aimed at protecting investments and ensuring more stable returns in volatile trading environments.

Read more...
πŸ‘16❀10πŸ‘Œ7πŸ‘1πŸ€”1
Welcome to the first installment of our comprehensive guide on building custom graphical user interface (GUI) panels in MetaQuotes Language 5 (MQL5). This series is designed for traders and developers who seek to enhance their trading tools with efficient, user-friendly interfaces.

In this segment, we will begin with project setup, designing your GUI panel layout, and integrating essential controls. Future parts will focus on making the panel interactive and responsive, suitable for real-time trading environments.

Understanding the full usage of MQL5 within the MetaTrader 5 trading terminal is crucial, as the entire coding and execution process will rely on these components. This guide aims to facilitate the creation of GUI panels using a straightforward, example-driven approach, equipped with necessary coding snippets for better comprehension.

For developers new to MQL5 or those l...

Read more...
πŸ‘15❀5πŸ‘1
The Hurst Exponent remains a critical tool in financial analysis, especially in determining market trends and behaviors in trading strategies. This metric, primarily analyzing the long-term persistence or mean reversion of time series, provides traders with a deeper understanding of market dynamics. By calculating this exponent, traders can ascertain if the market is trending with a value over 0.5, or mean-reverting with a value under 0.5, aiding in the prediction of future price movements relative to a moving average.

In practical application, combining the Hurst Exponent with moving averages allows for refined trading strategies tailored to different market conditions. The integration of a fast-moving average for mean-reverting markets and a slow-moving average for trending markets further enhances this method's efficacy. The approach utilizes Rescaled Range Analysis to estimate th...

Read more...
πŸ‘14❀5πŸ”₯2πŸ‘1πŸ†1
Integrating deep learning and sentiment analysis into MetaTrader 5 (MQL5) significantly advances algorithmic trading. Deep learning, involving complex neural networks, and sentiment analysis from natural language processing (NLP) techniques allow traders to refine decision-making processes, enhancing trading outcomes. In practice, Python integration into MQL5, via a shell32.dll interface, provides the capability to execute complex models and analyze sentiment effectively.

The trading strategy described entails running Python scripts to operate an ONNX model from TensorFlow for price predictions and to assess news sentiment to guide trading actions. When both indicators concur, the MetaTrader 5 Expert Advisor executes trades. Effective backtesting uses libraries like nltk and news-api, confirming the strategy's potential through strong correlation metrics and notable Sharpe and Sortin...

Read more...
πŸ‘15❀4πŸ‘2
Evaluating the moving average crossover strategy in today's algorithm-driven markets is essential. This examination focuses on whether this strategy, a longstanding component of technical analysis, retains its effectiveness and relevance. The moving average crossover involves two averages: one short-period and one long-period. A bullish signal is indicated when the short-period average crosses above the long-period average, and a bear trip when the opposite occurs.

Modern quantitative testing is applied to determine if this strategy still holds in the current market environment influenced heavily by algorithmic trading. The analysis includes a comparison between direct price change prediction and moving average crossover forecasts, to scrutinize the benefitsβ€”or lack thereofβ€”of using this traditional method.

Furthermore, the potential of integrating AI to enhance prediction of crosso...

Read more...
πŸ‘20❀3πŸ‘3
Transforming how sequence analysis and memory consumption are managed, the "XCiT: Cross-Covariance Image Transformers" paper introduces a novel approach redefining transformer models. Addressing challenges posed by the quadratic complexity of traditional self-attention mechanisms, the authors have developed a variant through cross-covariance attention (XCA), which processes feature channels instead of tokens. This innovative method reduces computational and memory requirements to a linear scale relative to token quantity, facilitating the processing of extensive data sequences.

XCiT achieves a blend of accuracy and scalability by combining traits from conventional transformers with convolutional architectures, showing promise across diverse visual benchmarks such as image classification and object detection. Further enhancements include local patch interaction blocks to foster commun...

Read more...
❀17πŸ‘6✍3πŸ‘2
Understanding market trends and trading in flats becomes more systematic with the use of specialized indicators. One such tool uses the concept of linear regression to assess direction and strength in market trends. By treating the trend within a given number of bars as a straight line, the indicator computes the line's parameters based on the equation y = bx + c, where 'b' represents the tangent of the incline angle.

This tool monitors the 'b' coefficient, which encompasses both the slope's tangent and a unique factor relating to the specific currency pair, affecting the indicator's scale across different pairs. It presents this data on a separate window within the trading platform, using color codesβ€”green to indicate an increasing slope (a strengthening trend) and red for a decrease (a weakening trend).

Traders can utilize this indicator in various strategies, such as trading on a...

Read more...
πŸ‘23πŸ‘12❀9