MQL5 Algo Trading
388K subscribers
2.56K 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
In our latest technical assessment, we explored integrating third-party libraries with MQL5 Algo Forge, focusing on the SmartATR library. Initially, manual cloning via Git worked to integrate the library, revealing MetaEditor's current limitations when handling external repositories. We found console commands a requirement for external code integration, as MetaEditor didn't fully support repository cloning without pre-existing correct permissions or context operations.

We explored an alternate approach: forking external repositories via the MQL5 Algo Forge web interface. Forking provides an independent copy where developers can make modifications, which is then visible in MetaEditor for streamlined repository management. This supports the open-source model, allowing for potential code contributions and efficient project backups.

👉 Read | Docs | @mql5dev

#MQL5 #MT5 #AlgoTrading
67👍5👏5👌21🤯1👨‍💻1
Developing advanced trading systems involves understanding classical patterns and programming skills. A recent implementation in MQL5 focuses on the Shark Pattern system, a harmonic pattern based on pivot points and Fibonacci retracements/extensions. The system automates trade execution upon detecting a valid pattern, offering flexible entry, stop-loss, and take-profit options. The use of chart objects enhances pattern visualization, aiding in clarity and decision-making.

For implementation, key steps involve defining structures for swing pivots, employing logic to detect pattern criteria, and visual aesthetics for chart depiction. Testing through historical data ensures efficacy and reliability, while careful risk management remains essential.

👉 Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
60👨‍💻54🤔4👌3🏆2👀2
A custom optimization function crafted for the MetaTrader 5 Strategy Tester, this script assists in analyzing test results beyond the typical use of Expert Advisors, indicators, or scripts. The code begins by collecting trade history from the tester, ensuring a minimum of 50 trades, and recognizing the initial deposit and testing periods. Trades are divided into In-Sample (IS) and Out-of-Sample (OOS) periods, facilitating a more robust analysis.

Thereafter, it calculates a series of metrics, covering factors like profitability, drawdown, Sharpe and Sortino ratios, and profit factor. Statistical analysis is conducted using Kolmogorov-Smirnov and Jarque-Bera tests. Strategy evaluation incorporates multiple dimensions: profitability, consistency, risk-adjusted performance, and statistical quality.

This code is applicable in various scenarios: strategy...

👉 Read | Calendar | @mql5dev

#MQL5 #MT5 #AlgoTrading
17👍3🎉2💔1👨‍💻1
In the ongoing development of our market simulation system, key challenges arise from ensuring system security, reliability, and performance. An essential step in this process is to address information leakage through proper encapsulation. Within the C_Mouse class, we identified a flaw in the SetBuffer function's accessibility, which was rectified by relocating it, thereby enhancing system integrity.

Further, system performance issues became apparent during extensive feature use, traced back primarily to the mouse indicator's intensive buffer reading. This was mitigated by isolating buffer accesses and optimizing class variable storage versus repetitive function calls.

The system's updated architecture now reflects a more robust class hierarchy aimed at maintaining performance levels while allowing for scalability and adaptability in future developme...

👉 Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
21👨‍💻2
The transition to MQL5 Algo Forge emphasizes leveraging community-contributed code. A crucial step involves integrating third-party libraries while ensuring code remains modifiable through personal forks. In Part 3, SmartATR was integrated into the SimpleCandles Expert Advisor, highlighting challenges in direct cloning. A structured workflow using forks resolved these issues, with changes proposed to original repositories via Pull Requests.

Publishing modifications involves committing or releasing new versions. For efficient version control, obsolete branches should be managed to prevent repository clutter. A branch is essentially a sequence of commits, which remain intact post-deletion. Locating prior branch states involves identifying specific commits and understanding Git concepts like tags and the HEAD pointer. Tags, especially lightweight ones, ...

👉 Read | CodeBase | @mql5dev

#MQL5 #MT5 #AlgoTrading
29👌4👍2👨‍💻2
Dive into advanced techniques for improving MetaTrader 5 libraries with this insightful article focusing on graphical object events. Discover how you can define precise changes in properties and track the history of modifications, enabling enhanced analytical tools with memory capabilities. Learn about handling complex scenarios, such as multiple object additions and chart-linked object restoration. Benefit from structured methods for capturing object renaming sequences and managing removed graphical objects efficiently. Perfect for developers seeking to refine trading tools, this article offers detailed, practical approaches for leveraging the full power of MQL5's dynamic arrays and chart management classes.

👉 Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
63👍13👌62🏆2👨‍💻2🎉1
Explore an innovative approach to volatility prediction using MetaTrader 5 and Python integration for algorithmic trading. Discover a three-tier architecture where MetaTrader 5 efficiently streams market data, while Python employs libraries like Sklearn and XGBoost to identify volatility patterns, thanks to the property of stationarity. The Data Pipeline processes data for noise removal and metric calculation, ensuring optimized performance. The Analytics Core leverages machine learning for accurate volatility forecasts, outperforming complex models with simplicity. The Risk Advisor uses these forecasts for dynamic risk management adjustments. This system offers robust, adaptable trading strategy enhancements, bridging traditional indicators and modern analytics.

👉 Read | CodeBase | @mql5dev

#MQL5 #MT5 #AlgoTrading
48👍9👌6🤯3🎉3👨‍💻21
The FinMem framework, based on large language models, presents a novel approach to trading through its unique layered memory system. This system is divided into Working and Long-Term Memory components, managing short-term data and long-lasting information, respectively. The profiling module adjusts the agent's behavior based on user preferences and market conditions, while the decision-making module combines real-time data with stored memories to craft strategies that consider both short-term trends and long-term patterns. This is key to enhancing the accuracy and efficiency of investment decisions.

The FinMem framework's implementation in MQL5 introduces the CNeuronFinMem object, which reproduces the stratified data processing approach. The integrated algorithm manages data by processing an environment-state tensor and comparing it with a trading ...

👉 Read | AlgoBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
21👨‍💻1
Part 25 of the MQL5 series introduces the development of an Expert Advisor (EA) to automate trading by identifying trend lines for signals. Unlike the previous focus on support and resistance zones, trend lines are used to assess market direction and breakout points.

The EA requires the user to manually draw two trend lines and name them appropriately. It can handle both breakout and reversal trades, setting stop-loss and take-profit levels based on the latest candle's data. By processing the last five candles, the EA detects if a price breaks or reverses from a trend line, ensuring relevant market moves. The use of trend line names and chart IDs enhances precise monitoring and engagement, avoiding unnecessary trades.

👉 Read | NeuroBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
72👌9🔥4👍3🤝3👨‍💻21
Explore a revolutionary approach to cross-validation for time series in MetaTrader 5. Moving beyond classical methods, this article demonstrates how optimizing models with domain-specific validation techniques can effectively reduce overfitting. By training models on the most recent, relevant data rather than the full dataset, developers can enhance accuracy and reduce computational costs. Through empirical testing, it was found that using only 80% of the latest data yields the best results, challenging the traditional "more data is better" philosophy. This innovative strategy streamlines model training, ultimately benefiting developers with shorter development cycles and efficient resource utilization.

👉 Read | Signals | @mql5dev

#MQL5 #MT5 #AlgoTrading
42👍2👨‍💻1
This article discusses the creation of an on-chart control panel for MetaTrader 5, targeting traders and developers interested in algorithmic trading. The focus is on building a user-friendly interface using MQL5 to automate lot size calculations and orders, enhancing speed and reliability. Readers learn how to assemble a static GUI layout, addressing key parameters such as order types, entry price, stop-loss, and risk per trade. The article details how to structure an Expert Advisor with essential functions like OnInit and OnTick. By following the guide, developers gain insights into crafting professional interfaces, improving both trading precision and interface usability.

👉 Read | Forum | @mql5dev

#MQL5 #MT5 #AlgoTrading
302👌2👨‍💻2
In trading, coding is integral for developing systematic strategies, enhancing decision-making, and reducing emotional bias. The MetaTrader platform, widely used for trading, supports MetaQuotes Language (MQL) which facilitates the creation of algorithmic trading systems. MQL offers tools like Expert Advisors and custom indicators to automate trading based on predefined strategies.

Understanding the basics of MQL5 is pivotal. This includes variables, Boolean logic, loops, and conditional statements. These fundamentals help build logic into trading algorithms, paving the way for creating automated systems, such as a Simple Moving Average crossover strategy.

To practice, use a demo account to safely test and refine coding skills within MetaTrader's terminal without financial risk. Compiling and debugging are essential steps in the process, ensuring th...

👉 Read | Quotes | @mql5dev

#MQL5 #MT5 #AlgoTrading
66👌5👨‍💻43👏1
Explore the innovative world of algorithmic trading as we dissect the Markets Positioning Codex in MQL5, tailored for equity strategies with a long bias. This article delves into sophisticated signal patterns utilizing RSI and DeMarker oscillators, targeting Nvidia Corp. Our approach employs hidden divergences, slope breaks, and M/W formations to harness market trends and price confirmations, ensuring robust signal development. The meticulous design aims to outmaneuver MetaTrader 5's Strategy Tester intricacies, offering traders and developers insightful solutions for optimizing trades. Understand how discrete pattern combinations and adaptive testing regimes can significantly enhance trading algorithm efficacy and reliability.

👉 Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
283👍3👌2👨‍💻1
Analyzing and maintaining algorithmic trading strategies presents significant challenges for developers of all skill levels. Novices face difficulties calibrating moving average strategies, while experts continuously tweak complex models like deep neural networks. Both approaches have inherent limitations; machine learning models can be fragile, and human strategies often demand intensive manual configuration at the outset. Proposing an ensemble framework, this study combines supervised models with human intuition, leveraging shared technical indicators to enhance performance dynamically. This synergy optimizes system stability, minimizing the need for constant parameter adjustments and effectively transforming unprofitable elements into a cohesive, successful strategy.

👉 Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
244👌3👨‍💻1
In Part 40, a Fibonacci Retracement trading system is developed in MQL5. This system calculates retracement levels using daily candle ranges or lookback arrays. It identifies bullish or bearish setups based on close versus open, triggering entries on price crossings of specified levels like 50% or 61.8%, with max trade limits. The implementation includes optional closures on new Fibonacci calculations, points-based trailing stops after a profit threshold, and SL/TP buffers as range percentages. The program is equipped with a visual representation, allowing for real-time monitoring. It combines flexibility and risk adjustment, suitable for traders looking to capitalize on pullback opportunities.

👉 Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
557🤝6👨‍💻5👌4🤯3👀2
Discover a cutting-edge approach to algorithmic trading with our comprehensive Delta-Gamma hedging framework on MetaTrader 5. By integrating robust Greek calculations directly into your Expert Advisor, you can automate the intricacies of Black-Scholes Greeks for dynamic portfolio management. Our system dynamically monitors delta exposure, leveraging high-frequency adjustments to maintain delta-neutral positioning while capitalizing on gamma-driven market shifts. Advanced risk management layers ensure precise execution, balancing between delta hedging and gamma scalping to capture short-term volatility. Experience enhanced trading precision and consistency with our automated solution, designed for traders focused on market-neutral strategies.

👉 Read | VPS | @mql5dev

#MQL5 #MT5 #AlgoTrading
38🔥2👨‍💻1
The ZigZag HH HL LH LL Pattern Label Indicator for MT4 presents an enhanced utility over the standard ZigZag tool by automatically detecting and labeling critical structural price points including Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL). This addition optimizes market structure analysis, pattern recognition such as Head & Shoulders and Quasimodo, and trend evaluation. The code comprises optimized functions compatible with MQL4, ensuring effective object management and timeframe tagging.

The indicator calculates the necessary ZigZag buffer for swings and line connections between points, essential for visualizing market trends. Its compatibility with dashboard scanners and multi-timeframe systems makes it an asset for manual traders, system architects, and EA developers seeking structured market insights. Practical a...

👉 Read | Forum | @mql5dev

#MQL4 #MT4 #AlgoTrading
387😱2👨‍💻21🔥1