MQL5 Algo Trading
391K subscribers
2.58K photos
2.59K 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
Uncover new potential in technical market tracking with the sophisticated SSH Multi-TF tool. This tool, based on the underlying SSH indicator, utilises moving average high and low prices to create two intersecting lines. The point of intersection between these lines is utilised as a buy or sell signal.

Not only does it offer the convenience of illustrating higher Time-Frames (TFs) within a lower one but it also prepares higher TF of this indicator in lower TFs, enhancing your market oversight capabilities. Furthermore, it provides the ease of selecting a higher TF from an embedded panel without the need to access the indicator input.

It's worth noting, when changing time frames, an automatic adjustment occurs in the sequence of time-frame buttons, eliminating any need for lower time frame button selections.

Additionally, the code furnishes a panel, readily adaptable for any indica...

Read more...
3👍1
The realm of machine learning is often steeped in trade-offs that may compromise one performance metric over another. As more complex models continue to evolve, understanding and debugging them proves to be a formidable task. This article seeks to clarify important elements such as crucial features, single feature impact, and collective feature influence, which can guide supervised model behaviour and reduce potential malfunction risks.

Debugging bears great significance, enabling developers to carefully track elements that may disrupt the harmony of real-world models. Furthermore, an understanding of feature engineering can heighten forecasting accuracy, leading the way through challenging terrains and facilitating the effectiveness of newly introduced features. An affinity with historical data can drive future data collection efforts, offering new data types to improve model behav...

Read more...
👍31👏1
Progressing in our journey of creating a Modified Grid-Hedge EA, the focus turns to the classic grid strategy. Lay aside the optimization of the classic hedge strategy for a moment and concentrate on automating the grid strategy using an Expert Advisor (EA).

This strategy commences with a buy position at a specific price and then scans for price increments or drops. Profit turns real when the take-profit level is hit. However, when the price lessens, the classic grid strategy provides a cover to ensure profits.

The price's decrease of a set quantity prompts another buy order, located at the initial price minus the set amount. Here, the lot size gets inflated, applying a lot size multiplier. These actions spark off two possibilities: an upward price movement that generates gains or a downward slide that calls for repetition of the process.

The golden moment arrives when the net pro...

Read more...
3
Insightful findings on expert initialization functions can significantly aid in the development process. The first step focuses on providing the input parameter, which is essential in framing a model or algorithm. The second step focuses on the crucial role of local variables initialization. This involves setting the initial value for a variable, critical for any program to function correctly.

Main code development, an elemental stage comprising the initialization of expert function and tick function, further enhances the process. Precise calculation of signal to send orders underpins successful transaction execution. The importance of calculating the volume cannot be overstressed, as it reflects the total number of shares or contracts traded within a specified timeframe adding a dynamic perspective to the analysis.

Another remarkable feature is the 'trailing Stop' function. The S...

Read more...
👌5
Deep learning, a subfield of machine learning, is centered on artificial neural networks and has the power to learn complex patterns without explicit programming. Deep Neural Networks (DNNs) utilize activation functions to enable more complex relationships. Python, known for its simplicity and efficiency, is frequently chosen for deep learning due to its extensive libraries like TensorFlow and PyTorch.

Python proves to be highly beneficial when combined with the MQL5 package for executing trading orders. The process first involves creating a Python script via TensorFlow or PyTorch for a designated trading strategy. Communication between the Python script and the MetaTrader 5 platform is established subsequently, with the end goal of executing trading orders.

An open-source format, ONNX, or Open Neural Network Exchange, contributes significantly to the interoperability of AI models ...

Read more...
👍3👏1
After scrutinizing socket (websocket) communication between EA and python server for resolving backtesting issues, this post will steer the course towards implementing onnx with MQL5 for model inference. It's vital to acknowledge that while onnx offers cross-platform capabilities, not all models might support it due to operator limitations.

To overcome this, diving into the socket technique can provide ample benefits, albeit demanding time and intensive work. The usage of onnx within MQL5 primarily pertains to conducting basic operations on ONNX models, encompassing the alignment of input and output of torch models and ONNX models, and conversion of preferred data formats for ONNX models. Additionally, it covers the intricacies of EA order management.

The model conversion process involves reading the model and configuration files relevant to our script directory structure. Post-tr...

Read more...
👍3👏1
In the realm of automated trading, reinforcement learning algorithms play a pivotal role by enabling sequential decision-making. However, the exploration process these algorithms follow often produces Agents only capable of local changes. A way to increase expressiveness of an Agent's policy is the implementation of latent variables. These make it possible to model more diverse scenarios aligning with historical observations, but present challenges due to the difficulty in calculating their entropy.

A solution to this challenge is found in the approach of the "Latent State Marginalization as a Low-cost Approach for Improving Exploration" article. Its authors propose a simple and efficient policy optimization algorithm able to provide effective and robust exploration in both fully observable and partially observable environments. This algorithm, named Stochastic Marginal Actor-Critic ...

Read more...
👍1
The concept of 'Bounce Number' takes high significance for IT professionals and developers when establishing strategies like Grid and Martingale. The idea behind it is to statistically analyze the historical data of a symbol from the Market during range zones - the number of times a price rebounded between two price points of a Range Zone.

Take 'Image No.1' - it's a visualization of how price movement generates the statistics of the Bounce Number Tool. For improved performance, the tool was created as an Expert Advisor (EA), incorporating the 'Sleep' function to prevent crash on the chart from excessive number of candle sets on the tool's input.

'Image No.2' shares a succinct graphical interpretation of the tools, describing their purposes. Considering a 'Bouncing Channel Half Height' set to '600 points', one will visualize:
- Bounce numbers between 1 and 6.
- What 'bounce number 2...

Read more...
😐4
Embrace the vast pool of trading and technical analysis tools for precise observations. Optimizing and testing tools results in a combination that benefits trading. The focus here is on automated trading systems. Find valuable insights that assist in identifying which system suits individual preferences. Engage in repeated testing to reach desirable results and make profitable trading decisions.

Learn about Aroon technical indicator; test strategies based on its concepts and results. Understand the calculation and usage of the Aroon indicator. There will also be discussions on ways to code these systems, highlighting time effectiveness of automating the testing process.

Topics:

- Aroon Indicator Definition
- Aroon Strategies
- Aroon Trading Systems
- Testing Aroon Trading Systems

At the end of this discourse, gain comprehensive knowledge about the Aroon indicator, its use, t...

Read more...
👍42
Understanding the scope of class functions and data storage in programming remains fundamental in mastering coding techniques. The introduction of class CCheck, devoid of additional variables, solidifies this concept. Notably, the utilization of program variables encompasses data storage in a precise and accurate manner. It's important to comprehend the modulation of historical bar variables for storing data statically.

The usage of advanced functions, specifically to obtain the latest bar time, is recommended due to its efficacious running speed. Awareness of its response process: in the event of a false return, an exit does not occur, prompting the need to verify for any error codes.

Initial values play a crucial part, especially when used for the first time. The historical data's storage location will be populated with these values, facilitating subsequent comparisons. This proce...

Read more...
2👍2
Get to grips with the intricacies of machine learning in a focused discourse on neural network activation functions. Understand the role of these crucial services in computing output signals from input data. Assess the requisite conditions for differentiable activation functions with emphasis on facilitating error backpropagation during the training process.

Analyze the advantages of non-linear activation functions in training with a nuanced discussion backed by study cases. Horde substantial insights into the tale of linear functions like ReLU that have established a reputation for efficiency despite their linear nature.

Get a thorough walkthrough on the graphs of multiple activation functions and their derivatives, scaled from -5 to 5, further elucidating the subject. Learn about an innovative script that affords a detailed display of function graphs on price charts and offers an ...

Read more...
👍3
In our rapidly evolving industry, staying updated with advancements and refining knowledge is crucial. This writing piece will focus on helping developers understand the complexities of modern database structures and how they relate to real-world scenarios.

Understanding this aspect not only strengthens the foundation of your IT skills but also allows for better decision-making during development projects. By comprehensively grasping database structures, one can design, implement, and maintain more robust and efficient systems.

This article also satisfies the thirst of those who wish for a deeper understanding of how diverse solutions are implemented in real, live products. It's not just theory, but rather a connection between theoretical study and practicing programmers. With this understanding, one can better comprehend both the limitations and the power that they carry in their c...

Read more...
👍53🎉1🏆1
Monoidal groups, concepts derived from category theory, offer insightful perspectives on decision-making points in algorithmic trading. Unlike the expansion viewpoint adopted in the examination of monoid actions, this exploration reverts to previously defined, restricted monoids, highlighting the conceptual utility of these structures. By considering monoidal groups, we examine the aspect of re-evaluating the identity elements in the context of trading decision points.

Monoids represent a pool from which a trader can select decision options. This pool becomes increasingly diverse through the use of monoid actions, which served to increase the scale of potential choices. Yet, when considering monoid groups, the focus shifts from expansion to transformation, as we reassess the same pool choice.

Implementation of monoidal groups within MQL5 does not highlight any substantial class code...

Read more...
4👍2👏1
The Relative Moving Average (RMA) presents a deviation from the widely adopted Exponential Moving Average, boasting a unique calculating factor of 1/cycle. Characterized by a singular input variable, the calculation period, customization takes the shape of line type and color alternations. This can be easily accomplished within the accessible Parameters or Color tab. Once the necessary adjustments are finalized and the loading process is complete, the ensuing graphical representation lends itself to valuable analysis. No need to be overwhelmed by esoteric quantitative methods. The simplicity and efficiency of RMA put powerful analytical tools within the reach of every developer. Insights await.

Read more...
6👍3👏1
The shift from manual mode to automatic operation using the Expert EA isn't a task for the faint-hearted. This article sheds light on the transformation process. A key component that facilitates such shifts is the creation of the C_Automaton class. The primary focus here is on the interconnection of this class with the EA and the C_Manager class. These elements replace the trader in executing trading commands.

Importantly, no alterations should be made to an existing, functioning system to incorporate the C_Automaton class. It's advisable to take the system offline, restore C_Mouse, and test after effecting modifications. Once the performance is satisfactory, the C_Automaton class can be reintroduced to the system.

The C_Automaton class in itself is a feature-heavy entity. It maintains its uniqueness across different EAs by depending on specific methods. This ability ensures the fle...

Read more...
👍2👏1
Delve into the realm of algorithmic trading with the advanced Expert Advisor (EA) crafted for strategic money management. This EA embraces the dynamism of martingale strategies and accentuates it with a multiplier feature.

A straightforward method is recommended for harnessing the full potential of the 'MartingaleEA-5Levels'. Ensure the EA is up and running ahead of initiating any trading positions. This condition optimizes the algorithmic intelligence for superior results.

In the settings, it's crucial to activate the 'Martingale Mode' by setting it to 'true'. The user is required to input the preferred trading symbols, for instance, EURUSD or GBPUSD.

Further customize the trading strategy by selecting a martingale multiplier. This value is set in the 'Martingale Volume Multiplier', which influences the volume of trading positions. An input of '2' would mean that a subsequent po...

Read more...
👍51👏1
Forex trading, with its daily turnover of $6 trillion, offers substantial profit opportunities, but also carries commensurate risk. A crucial differentiating factor resides in the ability to identify good entry points, structure profit and loss boundaries, and maintain discipline. The aim is to secure a share of the vast daily forex turnover, one that is distributed to an extensive subscriber base.

A critical tool in successful forex trading is understanding the context provided by MQL5.com. The platform offers a market for various experts, indicators or utility aids for trading, and valuable free tools within its Codebase. It also presents a section dedicated to signals that can provide guidance for creating your own.

Studying other successful signal providers is an essential step in creating a reliable signal. Understanding their approaches, work processes and methodologies can pr...

Read more...
👍542
Presenting an indicator capable of reading both the balance and equity from trading accounts and visualizing them on a standalone chart. Extremely simple to use and exceptionally beneficial for accurate backtesting.

What it showcases: The projection of balance over time is represented by a blue line, whereas equity fluctuations over time are demonstrated by a green line.

This tool, however, comes with certain limitations. Due to the usage of the AccountInfoDouble() method for reading balance and equity, it is unable to capture data prior to being attached to a chart. It only exhibits the dynamics of balance and equity from the exact time it is attached.

This limitation, ironically, makes it an even more valuable asset for backtests. The tool offers a close-up view on drawdown analysis with a zoom-in and zoom-out features, in parallel with the chart. Although it doesn't provide hi...

Read more...
2👍2👏2
The Numerical Analysis Library or ALGLIB, is a high-performance library designed for numerical methods and data analysis algorithms, a perfect assistant in analyzing complex financial markets. ALGLIB is recognized among the top libraries due to its compatibility with several programming languages and operating systems. Using ALGLIB, linear algebra, solving equations, interpolation, and optimization can be achieved with efficiency and simplicity, opening new possibilities in market trends prediction. Portability and ease of use, coupled with its open-source nature make ALGLIB an excellent choice for both scientific research and commercial projects.

ALGLIB, first adapted for use in the MQL5 language in 2012, over the years, has gained recognition among developers. With more than 70 changes made to improve the library, its versatility benefits numerous financial processes. However, use...

Read more...
👍31🔥1
Presenting a robust Multi-currency Expert Advisor, designed to manage and trade across 30 pairs, driven by Fast and Slow RSI indicators. Equipped with multiple trading strategies, this Algorithmic Trading system caters to both novice and seasoned traders. It's built with a foundation in MQL5, offering reliable features and flexibility.

The trading pairs include 28 forex pairs and 2 metal pairs accounting for versatility. The Expert Advisor also natively handles forex and metal symbol pairs with prefixes and/or suffixes in MetaTrader 5. Single and multi-currency trading options provide additional customization.

RSI indicators strategically analyses market trends and signals, enabling informed decisions. The multi-currency expert advisor manages stop loss orders, take profit orders, trailing stops, trailing take profit and manual orders. Also accessible are multiple manual button cl...

Read more...
2👍2👏1
Leveraging the 15-minute timeframe on EURUSD, this Expert Advisor (EA) utilizing MetaTrader 4 provides valuable assistance for savvy traders. Operating on the basis of price movements relative to the Moving Average, it advises when to execute buying or selling trades.

Key functionalities include the option to preset time range for trading as per server time. In addition, parameters for stop loss, profit targets, lot size, and unique magic number can be manually configured by the users, thereby providing flexibility to accommodate varying trading strategies.

Furthering its efficiency, customization of Moving Average settings can enhance adaptability to market volatility. Such versatility and comprehensiveness make it a robust tool for automated forex trading strategies.

Read more...
👍41👏1