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 the significant benefits of the Detrended Price Oscillator (DPO) for algorithmic trading in MetaTrader 5. This article delves into coding a custom DPO indicator, its integration into trading systems, and how it isolates short-term price cycles by filtering long-term trends. Discover effective DPO strategies like Zero Crossover and Trend Validation, offering clear protocols for automating trades. Enhance your trading insights with optimized systems and backtesting results. Whether you're a seasoned trader or a developer, the practical applications discussed provide valuable knowledge for improving trading performance with robust, actionable data-driven techniques.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Indicator
❀35πŸŽ‰4πŸ†3⚑2πŸ‘¨β€πŸ’»1
In the realm of algorithmic trading, Reinforcement Learning (RL) exhibits significant promise with TD3 (Twin Delayed Deep Deterministic Policy Gradient) emerging as a key player. TD3 excels by addressing the limitations of its predecessor, DDPG, through enhanced stability and efficiency, making it ideal for trading, where market dynamics are continuous and volatile. It leverages dual critics to reduce overestimation bias, incorporates target policy smoothing to manage market noise, and introduces delayed policy updates to stabilize learning. The RL cycleβ€”comprising environment interaction, action selection, and reward optimizationβ€”is integrated with Python for training and exported via ONNX for seamless execution in MQL5, thus bridging advanced training with practical trading execution.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #ReinforcementLearning
❀38πŸ‘Œ7πŸ†6πŸ‘¨β€πŸ’»3⚑2
Elevate your trading strategy by incorporating a robust statistical arbitrage framework for MetaTrader 5. This method focuses on creating a mean-reversion strategy with cointegrated Nasdaq stocks alongside Nvidia (NVDA), prioritizing market neutrality. A comprehensive scoring system evaluates stock pairs through criteria like Engle-Granger and Johansen cointegration tests, spread stationarity, and liquidity. This framework efficiently screens thousands of stock combinations, maintaining a focus on stability and tradeability. Detailed correlation and cointegration analyses ensure a well-informed selection process, paving the way for a robust, data-driven, and economically meaningful portfolio development. Such a strategy optimizes resource allocation and enhances trading edges through meticulous screening and backtesting.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Strategy
❀73πŸ‘¨β€πŸ’»9πŸ†6πŸ‘Œ4✍1
The Adaptive Relative Strength Index (aRSI) calculation involves a few key steps. Start by subtracting 50 from the traditional RSI value, then apply the absolute value function. This outcome is then divided by either 100 or 50, based on settings, to produce the aRSI value, which is expressed in a percentage-like format.

When adjusting bands, the lower band is computed as the current lower band value minus the product of the lower band value and aRSI. Conversely, the upper band is computed as the current upper band plus the product of the upper band value and aRSI.

An optional feature is available to toggle the display of the standard SuperTrend indicator. The overall settings include adjustable parameters for Factor, applicable to both SuperTrend styles, ATR length, and RSI length specifically for the aRSI SuperTrend.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #RSI
❀36⚑5πŸ‘2πŸ‘¨β€πŸ’»2
This project's recent advancement expands on our Shark Pattern system by incorporating a Trendline Breakout System in MQL5. It accurately identifies and trades on the breakouts of support and resistance levels. Utilization of swing points validated by R-squared and angle constraints ensures reliability in detecting market momentum shifts.

The system automates trendline detection, drawing, and breakout signals through comprehensive logic that includes handling the lifecycle of trendlines and managing trading signals in real-time. Our approach emphasizes capturing significant market trends while managing risks effectively.

With integrations for visualization and trade execution, this critical system supports automated response to market changes, with customizable settings for diverse trading strategies.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Strategy
❀69πŸ†8πŸ‘Œ7πŸ‘2⚑1πŸ‘¨β€πŸ’»1
This tool effectively identifies upward (bullish) and downward (bearish) pinbars on various chart timeframes. Users can customize the parameters for specifying pinbar structure and detection logic to meet specific needs. The tool visually represents detected pinbars with colored arrows, using lime for upward indicators and red for downward indicators, making it easier to interpret chart data. Moreover, it can be configured to provide pop-up alerts and push notifications, allowing timely updates in real-time trading scenarios. To utilize its full potential, adjust the input parameters according to the preferred trading strategy and enable alerts as needed for optimal monitoring.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀51πŸ‘¨β€πŸ’»5πŸŽ‰1
The article explores the enhancement of graphical tools within the MetaTrader 5 client terminal using the MQL5 language. It introduces a method to create composite graphical objects, enabling traders and developers to bundle analytical tools into new technical analysis sets. This is achieved by improving library classes, allowing for dynamic connections and arrangements between base and dependent objects. The development involves creating new classes to manage the coordinates of dependent objects attached to basic graphical objects, streamlining the process of graphical data manipulation. These advancements provide traders with the flexibility to configure and automate complex analytical tools in real-time, enhancing trading efficiency and accuracy.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Algorithm
❀52πŸ†7πŸ‘¨β€πŸ’»3
John Ehlers, in his February 2022 article for TASC, discusses the application of the inverse Fisher transform to develop a tool he names the "elegant oscillator." This version is an enhancement over the original, offering flexibility through the non-fixed oscillator period and the ability to choose different price inputs. Users are encouraged to experiment with various parameter settings. An example highlights two configurations: the default setting in red and an alternative setting with periods 100,100 in blue. This illustrates the broad scope for customization, providing traders with a versatile indicator that can be tailored to their specific analysis requirements within diverse market scenarios.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀39πŸ‘4πŸ‘¨β€πŸ’»3
Optimize your trading strategy with a sophisticated approach to MetaTrader 5 by applying multiple custom criteria in a single optimization run, rather than separately. The article introduces innovative techniques for visualizing balance and equity graphs, using minimal MQL5 coding experience. By utilizing separate include files for key functionalities, you streamline data collection and custom criterion calculations. Discover methods to evaluate optimization results efficiently with advanced graphical representations for balance and equity, allowing you to make informed decisions swiftly. The approach boosts productivity by preserving only necessary trade data, thus ensuring effective data processing and insightful criteria evaluation for better trading outcomes.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #ExpertAdvisor
❀80πŸ‘15⚑6πŸ‘¨β€πŸ’»3πŸŽ‰2
The Didi Index has been simplified by inverting only the slow line to align with the trend direction. This adjustment aims to streamline the interpretation process while retaining essential trend visibility. By focusing exclusively on the slow line inversion, complexity is reduced without sacrificing crucial trend-following capabilities. This approach is particularly beneficial for traders seeking a refined method for gauging market trends and making informed decisions. Implementing this simplified version can enhance analytical accuracy and efficiency, simplifying the decision-making process for traders while maintaining reliability in market trend assessment.

πŸ‘‰ Read | Forum | @mql5dev

#MQL4 #MT4 #Indicator
❀36πŸ‘¨β€πŸ’»8πŸ‘7πŸ”₯2πŸ†2πŸ‘Œ1
Optimization algorithms continue to be vital in solving complex problems. Among these, the Cyclic Parthenogenesis Algorithm (CPA) draws inspiration from aphids' reproductive strategies, balancing solution exploitation and search space exploration. Proposed by Ali Kaveh and Zolghadr, CPA involves colonies of solutions, with mechanisms for both self-replication and paired reproduction. It organizes decisions within the colony and introduces migration between them for information exchange.

Implementing CPA involves creating several colonies, each having "female" and "male" individuals. The process includes using the C_AO_CPA class, which manages parameters like population size and colony count. The algorithm proceeds through initializing, moving, and revising solutions, incorporating factors such as scaling and flight probability.

Test results for C...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #algorithm
❀69πŸ‘16πŸ’”6✍3⚑3😁3πŸ‘Œ3
MA Cross Alert is a custom indicator for MT4 platforms that addresses a specific issue with the built-in Moving Average function. Traditional Moving Averages in MT4 lack alert systems to notify users when prices cross these averages. MA Cross Alert fills this gap by providing immediate notifications whenever such a crossover occurs. This makes it effective for both trend-following and reversal strategies.

The indicator supports various types of Moving Averages, such as SMA, EMA, SMMA, and LWMA, making it versatile for different trading needs. Users can receive alerts via on-screen notifications, push notifications to the MT4 mobile app, or emails. To use mobile and email notifications, ensure settings are configured in the MT4 platform.

Visual signals such as arrows and labels can be displayed on the chart, assisting in the analysis of buy/sell oppo...

πŸ‘‰ Read | Signals | @mql5dev

#MQL4 #MT4 #Indicator
❀42πŸ”₯6πŸ‘¨β€πŸ’»1
Explore an innovative approach to MetaTrader 5 algorithmic trading with the Statistical Dashboard for automated price-action analysis. This feature-rich tool revolutionizes the way traders interact with statistical metrics like mean, standard deviation, and median by integrating them directly onto charts. Users can now set date ranges, compute distributional statistics, and visualize market reference levels such as support and resistance on-demand. The tool’s modular design supports robust market analysis, adapts to individual trading styles, and simplifies workflows by eliminating the need for code edits. Practical applications include enhanced signal detection, snapshot functionalities for live monitoring, and CSV data exportβ€”all enhancing decision-making efficiency.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #EA
❀35πŸ‘5πŸ‘1😁1πŸ‘¨β€πŸ’»1
Explore an innovative approach to enhance debugging in MetaTrader 5 with a dedicated Backend Operations (BEO) class. By bypassing the clutter of shared log tabs, this system offers tailored, real-time monitoring directly on your trading charts. Harness MQL5's capabilities to capture and display critical performance metrics, error logs, and trade outcomes in a structured format. The modular CBEOMonitor class introduces clarity and consistency, simplifying diagnostics across all trading activities. Designed for seamless integration, it offers both on-chart and terminal log outputs, aiding in precise issue identification and system optimization. Enhance your Expert Advisor debugging workflow and gain deeper insights into trading operations with this robust tool.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #EA
❀19πŸ‘12πŸ‘¨β€πŸ’»2
Discover a sophisticated Breaker Block Trading System in MetaTrader 5 (MQL5) designed for expert and aspiring algorithmic traders. This system identifies consolidation ranges, validates breaker blocks with swing points, and executes retest trades with customizable risk settings. The framework identifies tightly ranged price movements, followed by breakouts and impulsive moves, transforming order blocks into breaker blocks upon invalidation. Implemented in MQL5, this strategy includes dynamic chart visualizations and precise trade execution without manual intervention. Developers benefit from structured code, adaptable logic, and comprehensive management of trade execution, ensuring efficient and effective trading operations.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #EA
❀92⚑11πŸ‘7πŸ’―5πŸ‘€5πŸ‘¨β€πŸ’»3
Trend Vision, a custom MT4 indicator, merges MACD momentum with Bollinger Bands volatility to deliver precise trading signals. MACD captures momentum shifts, divergence, and trend strength, while Bollinger Bands assess volatility patterns. This integration filters out false signals, highlighting moments with aligned momentum and volatility.

Key features include double confirmation using MACD and Bollinger Bands alongside visual signals like color changes and arrows/dots on charts. It supports multi-timeframe use, from 1M scalping to weekly swings, and offers diverse alert systems: on-screen, push, email, and sound alerts.

The input parameters are customizable. Fast MA period for MACD is set at a default of 12, and the slow MA period defaults at 26. Bollinger Bands use a standard deviation multiplier of 2.5. Alert preferences allow for native alert...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL4 #MT4 #Indicator
❀29πŸ‘6πŸ‘¨β€πŸ’»2πŸ”₯1
MetaTrader 5's Expert Advisor (EA) promises enhanced control over trading, especially for futures contracts. By enabling users to specify trade details like leverage and risk limits, the EA simplifies complex order placements, which can often be error-prone and time-sensitive. Utilizing object-oriented programming, the EA ensures easy maintenance and future scalability. Key features include an AdjustPrice function to handle varying price steps across assets and an OCO order system for secure trade execution, even in volatile markets. While suitable for partial orders, caution is advised due to potential volatility issues, positioning this EA as an essential tool for both new and seasoned algorithmic traders.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #EA
❀78πŸ‘11πŸŽ‰7πŸ€”5😁4⚑3πŸ‘¨β€πŸ’»1
The updated Didi Index you refer to includes an inverted slow line, providing a clearer representation of trend direction. This alteration allows for more straightforward analysis by aligning the slow line with the overall trend. Additionally, the code has been optimized for efficiency, reducing computation time and enhancing performance. These optimizations may include refined loop structures, improved memory allocation, and other technical tweaks that contribute to faster execution. As a result, this revised index offers a more responsive and user-friendly experience for analyzing market trends, proving to be a valuable tool for those working with complex datasets and time-sensitive analyses.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀26πŸ‘4πŸ‘€4πŸ‘¨β€πŸ’»2
In this comprehensive guide on leveraging MetaTrader 5 for algorithmic trading, we explore an advanced method to analyze deal history dynamically. By exporting completed trades to a file, these trades can be run through the strategy tester, allowing traders to experiment with different stop-loss and take-profit scenarios. Developers can implement an Expert Advisor (EA) that accesses historical data for rigorous backtesting. This approach provides traders with insights into past trading behaviors, enabling them to optimize strategies and validate predictions under various conditions, thus enhancing both the accuracy and performance of their trading systems. This tool proves invaluable for refining ongoing trading strategies.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #EA
❀27πŸ‘7πŸ‘Œ5πŸ‘¨β€πŸ’»2⚑1
In analyzing financial trading strategies, it becomes clear that traditional methods often fail to account for the dynamic nature of markets. The classical Bollinger Band strategy, while widely used, demonstrates consistent losses in backtests. Our analysis shows a -$169 loss over five years with a suboptimal Sharpe ratio of -0.53.

The double Bollinger Band system, an extension developed by institutional traders, improves market adaptability. By employing dual bands with varied standard deviations, this strategy significantly outperforms the classical approach. Results indicate a $228 profit, improving accuracy to 56% winning trades and delivering a positive Sharpe ratio of 0.5.

This advancement showcases resourceful adaptations of established methods, yielding a transformative trading strategy that enhances profitability and reduces risk without a...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Strategy
❀38✍4πŸ†2πŸ‘¨β€πŸ’»2