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
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
Value at Risk (VaR) is central to market risk management in algorithmic Forex trading. It provides quantifiable assessments of potential losses over time periods, key to navigating Forex's volatility. Development efforts in MetaTrader 5 emphasize transforming theoretical VaR concepts into practical tools, leveraging Python for efficient integration.

Controlling drawdowns and optimizing portfolio via VaR are integral parts of dynamic position management systems. Key challenges include balancing between minimizing risk and achieving target returns. Optimization involves adapting the system dynamically, accounting for market conditions and maximizing efficiency while ensuring capital protection.

VaR's flexibility extends to varied trading strategies, enhancing grid systems' performance. Improved by systematic modifications like local trend adjustments and gri...

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #VaR
πŸ‘17πŸ”₯12❀10⚑5πŸ‘¨β€πŸ’»3
Point clouds provide a flexible 3D data structure, bypassing the complexity of meshes. Typically, researchers convert point cloud data into 3D voxel grids for deep learning models, but this introduces artifacts and increased data size. PointNet offers a direct approach by utilizing raw point cloud data. This model leverages point data's permutation invariance via a symmetric MaxPooling function, enhancing efficiency. The architecture supports both classification and segmentation tasks, handling 3D transformations effectively.

Implementation in MQL5 involves a new PointNet class, leveraging convolutional layers for feature extraction. This facilitates efficient point cloud classification within trading algorithms, integrating environmental state analysis.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #PointNet
πŸ‘45❀26πŸ”₯7✍3πŸ‘2πŸ€”2πŸ‘¨β€πŸ’»2
An emerging library now enables read/write access to ".tst" files, which adhere to the MT5-Tester single pass format. This development opens new potential for engaging with trading, automated systems, and strategy testing within the MetaTrader 5 platform, notably referenced since beta build 2155. The file format can transform Tester cache-folder data into market products like analyzers or correctors for Tester results. This approach allows the combination of single passes, showcasing combined statistics and cleaning cache data by eliminating unnecessary passes. Users can compute optimal portfolios with suitable weighting coefficients, determine best trading intervals, and utilize interactive statistical visualizations. Additional features include calculating optimal money management and evaluating hedge position efficiency based on historical data. Result...

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #MT5
πŸ‘20❀19πŸ‘¨β€πŸ’»4
MetaTrader 5 has been enhanced with a volumetric historical dataset of fundamental calendar events, available for programmatic access. This library streamlines data management, offering integration for both the Tester and live trading scenarios. Source code comments in example scripts demonstrate library functionality, aiding users in accessing historical data that parallels the native MT5 terminal display. Additionally, the library facilitates the acquisition of future event information, enriching Expert Advisors and indicators with timely updates on significant calendar events.

A featured Expert Advisor utilizes NonFarm Payroll data, analyzing present and forecast metrics for strategic trading. For historical data access, a single run in the MT5 terminal is required to download approximately 60MB, after which it's retrievable within the Tester. ...

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Calendar
❀17πŸ‘13πŸ‘¨β€πŸ’»5πŸ‘Œ3✍1
For Expert Advisor development within MetaTrader, handling the initiation of a new bar poses a unique challenge since there is no built-in OnNewBar() event. Instead, developers need to track the opening time of the most recent bar to identify changes that indicate a new bar has started. This approach is implemented by using a static variable within the OnTick() function to persist data about the bar's opening time across calls. This method ensures that even when OnTick() is exited, the variable retains its value, allowing the detection of a change in bar time. Special care should be taken when the EA is first attached to a chart, as the initial bar open detection will differ, needing adjusted logic. Code samples compatible with MQL4 and MQL5 are available in MetaEditor's "Public Projects" under "FMIC.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #EA
❀29πŸ‘14πŸ‘¨β€πŸ’»4✍1
A bot has been developed to detect the opening of new candles on any specified timeframe. This automation facilitates the execution of one-time operations like placing trades and invoking other functions. The main logic resides in the OnTick() function. Users can customize the PERIOD_CURRENT to match their desired timeframe for detecting new candle formations. This approach streamlines processes, reducing manual intervention and enhancing efficiency in trading environments. Adapt the timeframe settings based on specific requirements to optimize performance and meet trading objectives effectively.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Bot
❀25πŸ‘12πŸ‘¨β€πŸ’»5πŸ”₯1πŸ‘Œ1πŸ†1πŸ‘€1
The Atmosphere Clouds Model Optimization (ACMO) algorithm is an innovative approach to solving optimization problems by mimicking the natural behavior of clouds. By creating a virtual environment where clouds form in areas of high humidity, the algorithm explores potential solutions akin to cloud formations in the sky. Clouds move through a defined search space, spreading and adapting to environmental conditions, thereby avoiding local optima. The algorithm leverages cloud generation in high-humidity regions and guides cloud movement toward lower pressure areas, promoting diverse solution exploration and convergence on global optima. This methodology offers valuable insights for developers and traders engaged in algorithmic trading.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #Algorithm
πŸ‘25❀6πŸ†2πŸ‘¨β€πŸ’»2πŸ‘Ύ1
The article delves into the significance of compilation directives in MQL5, enhancing code simplicity, speed, and flexibility for algorithmic trading. These directives, akin to commands, guide more efficient coding and facilitate version control without losing previous iterations. The #include directive, prominently used, helps organize code into modular blocks or headers, simplifying maintenance and comprehension. By restructuring code into header files and using #include statements, developers can replicate complex functionality across projects with ease. This approach reduces error rates and improves compilation success, providing traders and developers a structured framework for creating scalable and efficient trading algorithms.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Education
πŸ‘38❀17πŸ‘¨β€πŸ’»5✍3πŸ‘Œ1
Discussing a strategy for hedge accounts: an Expert Advisor operates by opening two opposing positions on USDJPY, H1. Key actions occur when both positions close via Stop Loss or Take Profit, promptly opening new opposing positions at the next bar. Parameters available are limited to Stop Loss and Take Profitβ€”trailing and indicators remain excluded. The approach applies strictly to hedge accounts, emphasizing simplicity in operation and risk management without additional trailing mechanisms or indicator reliance. The strategy is straightforward, promoting disciplined trading based on predetermined risk and reward levels. It supports methodical engagement in the USDJPY market with a clear focus on entry and exit conditions.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #EA
πŸ‘28❀19πŸ‘¨β€πŸ’»3🀯1