MQL5 Algo Trading
387K subscribers
2.56K photos
2.56K 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
Technical traders rely heavily on indicators within their platforms, often combining multiple ones into a cohesive system. Streamlining the setup process for these indicators is crucial. For those interested in MQL5, crafting a panel directly on the chart to adjust settings can enhance usability. While ready-made panel codes exist, custom solutions may balance flexibility and ease of use. By organizing panel components into a structured layout with adjustable cell dimensions based on text size, traders can optimize their interface. Employing a class-based approach in code aids in managing objects efficiently, maintaining clarity across trading tools. Detailed implementations can be studied in various resources for further customization.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Panel
πŸ‘39❀29⚑4😎3πŸ‘¨β€πŸ’»2πŸŽ‰1
The efficient management of computational resources is crucial when processing data across multiple lookback bars. Instead of recalculating values every time a new bar closes, it's advisable to utilize phval, phloc, plval, and plloc as buffers. These buffers can streamline data management and enhance performance. However, be aware that handling buffers requires manual management, as the terminal lacks native support for complex data structures as buffers. Ensuring optimal performance and accuracy involves maintaining these buffers yourself, which adds a layer of responsibility. This approach can lead to efficient and effective data processing in technical environments.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Algorithm
πŸ‘26❀18πŸ‘¨β€πŸ’»3🀯2
Dive into the innovative Archery Algorithm (AA) that reshapes optimization problem-solving by emulating an archer's precision. Developed by Fatemeh Ahmadi Zeidabadi, this stochastic approach enhances trading strategies using randomness and probability mechanisms. AA's population of agents, akin to archers, explores solution spaces through strategic position updates based on a target member's performance. The algorithm employs Gaussian distribution for randomness and memory features for retaining effective solutions. By introducing a modification allowing direct feature exchange among agents, performance surged over 13%. For traders and developers, AA offers adaptable models minimizing risks in volatile markets, elevating the precision of forecasts and investment strategies.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Algorithm
πŸ‘26❀8πŸ’―3πŸ‘¨β€πŸ’»2
Neural networks often intimidate newcomers due to complex terminology. Yet, foundational concepts remain straightforward. In linear equations, "weights" align with slopes, and "bias" with intercepts. Earlier, we explored constructing a neuron capable of learning through trial and error. Adjustments in slope and intercept were key to improving accuracy. Further, handling multiple inputs transforms the neuron into a versatile tool. Beyond foundations, the sigmoid function introduces non-linearity, enhancing learning capability. Each step solidifies understanding, paving the way for more advanced neural structures. Although theory can appear daunting, practical application simplifies these principles, making the study of neural networks an engaging endeavor.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #NeuralNetworks
πŸ‘40❀21πŸ”₯2πŸ‘¨β€πŸ’»2⚑1😎1
Review of the Two Lines Indicator with RSI Fast and RSI Slow provides insights into combining momentum analysis with trend smoothing. By integrating the Moving Average, this indicator allows enhanced precision in detecting market trends. The intersection of the RSI Fast and RSI Slow lines can indicate potential signals for entry or exit. The concept leverages the strength of relative momentum provided by RSI and smoothens it with moving averages to reduce market noise. This method aids in clearer visualization of trend shifts, assisting in more informed decision-making. Careful analysis of these intersections could improve the effectiveness of trading strategies.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Indicator
πŸ‘30❀23😎5πŸ”₯3πŸ‘¨β€πŸ’»3πŸ’”2
Explore innovative methods for integrating online data into MetaTrader 5 Expert Advisors. The article delves into overcoming challenges of server response delays by employing communication channels and threading systems. It provides insight into creating local communication channels using objects, then transitioning to more robust solutions like services, leveraging global terminal variables for data exchange. This ensures seamless client-server interaction within the platform, even through timeframe changes. Such implementation not only advances algorithmic trading capabilities but also enriches developers' understanding of MetaTrader 5 features. Engage with these strategies for improved data handling in trading systems.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #ExpertAdvisor
✍26πŸ‘26❀11πŸ‘¨β€πŸ’»5πŸ”₯4πŸ€”1
Developers handling Expert Advisors (EAs) can benefit from integrating a code snippet designed to track account withdrawals effectively. Tracking withdrawals is crucial for adapting the EA's strategy, as many EAs remain on virtual private servers (VPS) to maintain consistent settings across time frames or chart templates. A common issue arises when EAs increase lot sizes to recover losses but fail to adjust them post-withdrawal, mistaking them for losses. This oversight can lead to strategies that unnecessarily escalate risk. Implementing this code will allow the EA to discern between withdrawals and losses, enabling it to decrease lot size after a withdrawal, thereby aligning risk strategy with the new account balance. Consider modifying the existing framework to incorporate this functionality, optimizing the EA's performance by maintaining an appropriate l...

πŸ‘‰ Read | VPS | Share!

#MQL4 #MT4 #EA
πŸ‘34❀13✍2πŸ‘Œ2πŸ‘¨β€πŸ’»1
Enhanced functionality has been introduced to your existing Expert Advisor, enabling withdrawal tracking on accounts where it is deployed. This addition assists in monitoring account withdrawals efficiently. Expert Advisors often run on VPS setups to maintain stability across parameter resets and chart changes. A key issue arises when these systems react to losses by increasing lot sizes without recognizing withdrawal transactions, which can skew trading strategies.

Withdrawal recognition is crucial because traditional EAs do not adjust lot sizes for withdrawals, only for losses. This adaptation is essential so that the EA can optimize its trading approach, ensuring sustainability by recalibrating lot sizes based on the actual account balance after withdrawals. The code modification not only monitors withdrawals but also intelligently adjusts the lot size relativ...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #EA
❀26πŸ‘13πŸ‘2😈2πŸ‘¨β€πŸ’»1
A new initiative is underway to develop an indicator for identifying ranging market periods using a standard object with a dynamic anchor point. This tool features a non-lagging mechanism with two operational modes; it determines ranges either through a set point threshold or dynamically using ATR with a multiplier. By default, ATR is utilized for its suitability in this function.

To enhance visibility, a pseudo chart distinct from the original is created, allowing for differential candle coloring within identified ranges. The logic behind range identification is straightforward, with customizable ATR period and multiplier inputs. These customizations allow users to define market ranges according to their personal trading strategy preferences, accommodating both long-term traders and scalpers in recognizing varying market activities.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Indicator
❀24πŸ‘17✍2πŸ†1πŸ‘¨β€πŸ’»1
Explore a new mathematical model of price movement in financial markets, departing from experience-based assumptions to establish a rigorous theoretical foundation. This model highlights the market as a complex system influenced by external factors, providing a structured understanding of price dynamics through interconnected quotes and their velocities. The interactions and feedback from various market participants generate complex oscillations in prices, similar to quantum mechanics, introducing probabilistic price movements. This innovative approach employs nonlinear equations to capture market dynamics, offering developers and traders a refined tool for analyzing and predicting market behavior based on statistical patterns and fluctuations.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #PriceModel
❀42πŸ‘27🀯4πŸ”₯2πŸ‘Œ2✍1πŸ‘¨β€πŸ’»1
This MT5 Expert Advisor leverages a combination of multi-timeframe candlestick pattern analysis and fundamental event filtering to execute trades effectively. It utilizes price action as its core strategy, focusing on candlestick formations like pin bars, engulfing patterns, and hammers across M5, H1, and H4 timeframes. A key aspect is the requirement for alignment between 5-minute triggers and the overarching H1/H4 trend structure.

Risk management is emphasized with a 1.5:1 risk-reward ratio, automatically setting take-profit at 1.5 times the stop-loss distance. Margin safeguard features include limiting margin usage to under 30%, adjusting position sizes accordingly, and employing dynamic stops through ATR-based volatility scaling or fixed distances.

The news filter prevents trade execution during high-impact news events, closing positions two hours pr...

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #EA
πŸ‘34❀19🀨3πŸ‘¨β€πŸ’»2⚑1
This new indicator provides a significant shift from the traditional zigzag indicators commonly used in market analysis. Traditional zigzags focus on highlighting past market swings with an inherent delay to confirm new swings. They are based on price action and primarily used for analyzing historical pivot points rather than detecting real-time signals.

In contrast, this dynamic, trend-based zigzag operates without lag to the current bar by leveraging the SAR trendβ€”a non-lagging, trend-following algorithm. Unlike previous trend-following zigzags, such as those based on the PSAR, which suffered from delays and produced invalid legs, this new approach ensures zero lag throughout its execution.

Integral to this structure is the backstep function, crucial for maintaining valid legs. By utilizing a specified number of lookback bars, it finds the highe...

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘21❀18πŸ‘¨β€πŸ’»6
Implementing efficient memory management in MQL5 is crucial for optimizing trading systems. Understanding stack and heap memory allocations, identifying memory lifecycle stages, and recognizing common pitfalls like excessive object creation or improper resource management can significantly enhance performance.

To measure and profile memory usage, developers can build custom tools due to the lack of native MQL5 support. Simple techniques involve setting benchmarks to study memory operations' execution speed, while memory pools can minimize allocation and deallocation overhead. Whether deploying object pools or advanced variable-size pools, managing memory manually improves performance consistency.

For data handling, employing circular buffers for time series and using cache-friendly structures ensure quick data access without bottlenecks. Advanced...

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #AlgoTrading
πŸ‘27❀17πŸ‘¨β€πŸ’»2
Understanding the nuances of control flow in programming is crucial, especially with statements like RETURN, BREAK, and CONTINUE. These statements manipulate the natural flow of loops and are key for efficient coding. The RETURN statement is often tied to function control, returning execution to the caller. It can end an application if misused in procedures like OnStart or OnInit, integral in environments like MetaTrader 5. BREAK is pivotal in exiting loops prematurely under specific conditions but can complicate when used in nested structures. CONTINUE demands caution, frequently leading to infinite loops if not managed properly. Grasping these concepts aids in writing robust, efficient code.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #loops
πŸ‘29❀11⚑2πŸ‘¨β€πŸ’»2
Deepening the understanding of DDPG is pivotal for those navigating reinforcement learning. The initialization of the DDPG-Agent class highlights essential components: dual network architecture, separate optimizers, and efficient experience management. Dual architecture facilitates stable learning through separate actor and critic networks, with target networks maintaining weight consistency. The experience management ensures memory efficiency via a fixed-size replay buffer for off-policy learning.

Incorporating key mechanisms such as state-processing, exploration strategies, and device-management in action selection enhances algorithm robustness. Learning updates demand sufficient experiences, allowing meaningful batch statistics; the critic networks update using stable Q-targets, while actor network updates focus on maximizing Q-values.

Target net...

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #AITrading
πŸ‘50❀25✍4⚑4πŸ”₯4πŸ‘¨β€πŸ’»2
The concept involves enhancing the iSAR indicator with the DRAW_FILLING style. This style fills the area between the price and the Parabolic SAR indicator, providing a clear visual distinction in trend analysis. An additional feature is the drawing of a rectangle on the right side, mirroring the filled area. This approach can help in better visual detection of trends and fluctuations by highlighting the zones that require attention. It's a useful modification for traders looking to improve their chart analysis capabilities. The integration of these visual elements into the iSAR indicator could offer significant benefits in interpreting market movements effectively.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Indicator
πŸ‘26❀22πŸ‘¨β€πŸ’»2⚑1πŸ‘€1
The article details the progressive implementation of the Hierarchical Vector Transformer (HiVT) for multi-agent motion prediction, specifically optimized for algorithmic trading using MetaTrader 5. The HiVT algorithm decomposes the problem into local context extraction and global interaction modeling, effectively enhancing prediction accuracy by analyzing dependencies in stages. The described model, CNeuronHiVTOCL, integrates various sophisticated techniques such as attention mechanisms and convolutional layers to accurately predict future trajectories. The HiVT uniquely introduces functionality to predict several potential outcomes and uses probability measures to determine the most likely trajectory, offering a robust tool for both traders and developers in algorithmic forecasting.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Algorithm
πŸ‘28❀13😁2πŸ‘¨β€πŸ’»2⚑1πŸ‘Œ1
Explore the advancements in enhancing MetaTrader 5 with the Trade Management Panel class for efficient trading operations. This initiative highlights a modular approach, integrating features like quick trade execution, risk management, and advanced pending orders, all consolidated within the NewAdminPanel EA. The class structure divides complex UI tasks, ensuring clear separation of market, pending orders, and batch operations. Utilizing helper functions and a central event system enhances maintainability and usability. Discover how these improvements streamline algorithmic trading, providing valuable insights and practical applications for both seasoned developers and newcomers keen on mastering MQL5.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #TradePanel
❀44πŸ‘36πŸŽ‰4πŸ‘Œ3🀯2πŸ‘¨β€πŸ’»2⚑1
The Expert Advisor (EA) is designed to monitor market dynamics by assessing the average pip movement per tick and average spread over a customizable tick count (MAX_TICKS). Additionally, it computes the average pip movement and spread over a defined time span (CHECK_SECONDS). By continuously tracking these metrics, the EA provides real-time insights into price changes and spread variations. Output is delivered both in the terminal and visually on the chart using the Comment() function. This functionality assists traders in assessing real-time market volatility and spread fluctuations, supporting more informed trading decisions.

πŸ‘‰ Read | Calendar | Share!

#MQL4 #MT4 #EA
πŸ‘30❀16πŸ‘¨β€πŸ’»3✍2πŸ‘Œ1
The post delves into the development of a Price Action Analysis Toolkit featuring a pivotal tool called the ZigZag Analyzer. This innovative tool employs the ZigZag indicator to efficiently draw trend lines by identifying key swing points, a vital aspect of technical analysis across various markets. MetaTrader 5 developers will appreciate the flexibility of MQL5, allowing the creation of adaptive trading systems. The article provides detailed insights into the system’s algorithm, focusing on efficient resource handling, accurate trendline and support/resistance drawing, and real-time adaptability. This technical prowess leads to clear actionable market insights beneficial for traders aiming for precise analysis and decision-making.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Trendline
❀29πŸ‘17πŸ‘€5πŸ€”3⚑2πŸ‘Œ2πŸ‘¨β€πŸ’»2