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
An advanced version of the ZigZag indicator introduces step size adjustments in price points. This enhancement offers options to visualize level lines that align with the most recent maximum and minimum extremes. It also allows displaying wave sizes in points, reflecting how many points the price traversed between levels. The indicator settings offer customization with color options for each element of the ZigZag. Users can choose to display a standard ZigZag, a ZigZag with level display enabled, or fully utilize all functions, including level lines and wave size in points. This flexibility offers users granular control over the analysis of market movements.
#MQL4 #MT4 #Indicator #Strategy

Read more...
❀30πŸ‘22πŸ‘Œ7✍2πŸ‘¨β€πŸ’»2πŸŽ‰1
The recent updates in the "Developing a trading Expert Advisor from scratch" series focus on enhancing the robustness of trading systems. This installment addresses critical issues impacting order management, particularly the catastrophic entry point error in trading algorithms. The solution involves modifying order handling logic to prevent discrepancies between chart data and server information during market interactions. The adjustment ensures stability by accurately managing stop and limit orders, crucial for minimizing financial risk.

The implementation introduces a method to modify trading volume without removing orders from the chart. The process involves integrating indicator objects and improving the interface for a seamless trading experience. This approach reduces manual intervention and potential errors, making the EA more efficient.

Overall, th...
#MQL5 #MT5 #EA #Strategy

Read more...
πŸ‘39❀20πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸŽ‰1
The initial version of DeMarker Pending advisor focused on core functionalities. In its second iteration, enhancements include two adjustable parameters: 'Maximum number of positions' and 'Minimum step of positions'. These options allow for increased control and flexibility in position management. Setting either parameter to '0' effectively disables it, providing tailored user customization. These additions are integral for users requiring specific trading strategies and position handling capabilities. The advisor demonstrates continued commitment to refining tools for precision and adaptability within trading environments. Further details are illustrated in the accompanying visual, Pic.1. DeMarker Pending 2.
#MQL5 #MT5 #EA #Algorithm

Read more...
❀25πŸ‘13✍3πŸ‘Œ3πŸ†1πŸ‘¨β€πŸ’»1
In the previous article, we explored modifications to enhance EA system reliability. We focused on separating functionalities to maintain efficiency and performance. This article extends that approach by emphasizing the importance of not embedding indicators in EAs. An EA should purely manage orders and observe prices, without reliance on indicators.

MetaTrader 5 separates indicators, services, scripts, and Expert Advisors to optimize performance. Indicators should operate on separate threads for parallel efficiency. Services can access data efficiently, which isn't ideal directly within an EA. Scripts perform specific tasks temporarily, while EAs should focus solely on trading system operations.

To improve EA reliability, remove non-trading system code, converting such elements into indicators. This reduces EA complexity and increases its agili...
#MQL5 #MT5 #ExpertAdvisor #Algorithm

Read more...
πŸ‘54❀17πŸ‘¨β€πŸ’»6⚑4πŸ‘Œ4
The concept centers on identifying moments when a completed candlestick intersects with the 'Moving Average' indicator. The next step involves locating the last prior intersection point. By marking the period between these intersections, a rectangle can be drawn. This rectangle’s upper and lower borders serve as potential Stop Loss and Take Profit levels. This approach combines technical analysis and strategic planning, presenting a method to refine trading decisions with clearer entry and exit points. Implementing this strategy could lead to enhanced precision in managing risk and maximizing reward potential through informed decision-making based on historical price movements and trend analysis.
#MQL5 #MT5 #Indicator #Strategy

Read more...
πŸ‘34❀19πŸ‘Œ4πŸ†2πŸ‘¨β€πŸ’»2
The Volatility Navigator is a new tool crafted with MQL5 to enhance trading precision by optimizing entry points, stop loss, and take profit targets. It leverages advanced indicators like Bollinger Bands, RSI, and ATR to adjust strategies dynamically in volatile markets. The tool's structure adheres to MQL5 standards, using the OnInit(), OnTick(), and OnDeinit() functions to initialize, monitor, and manage trades efficiently. This approach is crucial for responding to market changes swiftly. The integrated audio and visual alert system ensures traders receive timely notifications to make informed decisions, ultimately boosting trade effectiveness and strategy formulation.
#MQL5 #MT5 #Volatility #EA

Read more...
πŸ‘26πŸ‘€4❀2πŸ‘Œ2
Algorithmic trading frequently grapples with pinpointing optimal entry points, especially in daily trends where fluctuations can disrupt accuracy. Divergence acts as a filter, distinguishing potential reversals or continuations via discrepancies in price movements and momentum indicators. By integrating divergence detection into the Trend Constraint Expert Advisor, traders can significantly improve precision.

Incorporating divergence into an MQL5 Expert Advisor entails using tools like RSI and MACD to detect deviations. Regular divergence signals potential trend reversals, while hidden divergence indicates trend continuation. An Expert Advisor can utilize divergence signals by enhancing execution conditions with indicators such as MACD, RSI, or others.

Back-testing validates the practical application, showing effective positioning strategies with di...
#MQL5 #MT5 #Algorithm #Trading

Read more...
πŸ‘40❀18πŸ‘¨β€πŸ’»9πŸ‘Œ2
Introducing the open-source project MarketPredictor for MetaTrader 5. This innovative Expert Advisor leverages advanced mathematical models to analyze and predict market movements. It focuses on developers, math enthusiasts, and traders interested in the intersection of technology and financial markets.

Key mathematical components include:

1. Sinusoidal Functions: Aid in modeling cyclical price movements.
2. Fast Fourier Transform (FFT): Uncovers dominant frequency patterns in historical data.
3. Sigmoid Functions: Addresses nonlinear market movements, factoring in volatility.
4. Monte Carlo Simulations: Provides forecasts by modeling random deviations.

Current challenges include implementing the trading logic. Contributions are sought for parameter optimization, trading logic improvements, bug fixing, performance enhancements, and advanced analytical i...
#MQL5 #MT5 #EA #AlgoTrading

Read more...
πŸ‘29❀13πŸ‘¨β€πŸ’»4πŸ‘Œ1
Metaheuristic evolutionary algorithms, such as Across Neighborhood Search (ANS), continue to advance optimization capabilities in tackling complex numerical problems. ANS, established by Guohua Wu in 2014, utilizes multi-agent systems to enhance exploration within a solution space, combining local and global strategies. The algorithm models agents moving through solution neighborhoods, guided by normal distribution to update positions based on current optima. Key parameters include population size, solution collections, and standard deviation for defining search intensity.

Testing shows ANS achieves strong results across diverse functions, though it faces issues with population diversity and potential degeneration. Enhancements, such as introducing mutation operators, could stabilize performance and prevent solution convergence. ANS ranks highly among conte...
#MQL5 #MT5 #algorithm #AI

Read more...
πŸ‘28❀6πŸ‘¨β€πŸ’»2πŸ‘Œ1
Explore our deep dive into crafting a USDJPY trading strategy using MQL5, focusing on candlestick patterns like bullish engulfing setups. The strategy enhances profitability by using technical principles over machine learning choices, maintaining simplicity and efficiency. The framework relies on precise volatility tracking, employing a daily timeframe for increased reliability. Key steps include initialization and global variable management, tailored to identify trading patterns efficiently. Enhancements involve adding extra layers of technical analysis, integrating moving average channels, and considering historical volatility for more informed decision-making, striving to improve trade accuracy and minimize losses. An intriguing approach for both aspiring and seasoned traders.
#MQL5 #MT5 #AlgoTrading #Candlestick

Read more...
πŸ‘25❀14πŸ‘¨β€πŸ’»4πŸ‘2πŸ‘Œ2
Discover the power of automating the Kumo Breakout Strategy in MQL5. This expertly-crafted guide provides a comprehensive walkthrough on transforming this popular trading approach into a fully functional Expert Advisor within MetaTrader 5. Learn to leverage the Ichimoku Kinko Hyo indicator for recognizing potential market shifts, coupled with the Awesome Oscillator for trend confirmation, thus enhancing trade accuracy. The article meticulously covers strategy coding, trade management, and risk control through trailing stops. Concluding with performance testing and optimization tips, this resource is invaluable for developers aiming to refine their algorithmic trading skills and maximize market opportunities.
#MQL5 #MT5 #Strategy #EA

Read more...
πŸ‘19❀11πŸ‘Œ5πŸ‘¨β€πŸ’»2
The Chaikin Money Flow (CMF) is a vital technical volume-based indicator used individually or with other tools. This tool, developed by Marc Chaikin, provides insights into price action by monitoring accumulation and distribution patterns. Results are determined by the CMF oscillating around zero, signaling buying and selling momentum.

Creating a custom CMF indicator involves specifying graphic properties, setting user inputs, and coding calculation logic for precise trading application. It enables traders to modify behavior to meet individual trading needs.

Strategies such as CMF zero crossover, overbought/oversold, and trend validation offer diverse trading approaches. These involve integrating additional indicators, like moving averages, for enhanced trend confirmation and performance optimization.
#MQL5 #MT5 #Indicator #Strategy

Read more...
πŸ‘40❀22πŸ‘Œ5πŸ‘¨β€πŸ’»4🀯1
A streamlined adaptive grid expert advisor designed for MetaTrader 4 offers versatility across various time frames and commonly traded forex symbols. Compatibility has been confirmed on EURUSD with an M15 time frame. For developers looking to modify or enhance this code, it is advisable to visit the Freelance department within the Visual Expert menu. Such updates can optimize the advisor's effectiveness or tailor it to specific trading needs. When implementing or adjusting strategies, always consider back-testing across multiple scenarios to ensure robustness and performance consistency in changing market conditions. Use the resources available for any further technical requirements or customization guidance.
#MQL4 #MT4 #EA #Forex

Read more...
πŸ‘31❀6🀝5πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸ’―2😁1
In the evolving world of financial markets, efficient data processing is pivotal. This article explores the integration of MQL5 with advanced data processing tools to manage vast datasets like real-time tick data and decades of historical records. Key techniques include gathering historical data via the MetaTrader 5 API, converting it to pandas DataFrames, and enhancing it with technical indicators like moving averages and RSI. Additionally, a machine learning model, deployed via a Flask API, informs trading decisions in real-time within MQL5. This approach empowers traders by combining rigorous data analysis with predictive modeling to refine trading strategies and adapt to market changes efficiently.
#MQL5 #MT5 #BigData #ML

Read more...
❀14πŸ‘12πŸ‘¨β€πŸ’»3πŸ‘Œ2⚑1πŸ†1
In automated trading, handling CSV files in MQL5 is essential. This article outlines the development of a robust CSV reader class to import and manage external data efficiently. The MQL5 environment restricts file operations to the β€œsandbox” directory for security. File operations are managed via specific modes like FILE_READ and FILE_TXT. Line-by-line reading and file error handling are crucial for effective data management.

The CSV reader class designed here handles headers, maps columns to indices using a hash map, and stores data rows in dynamic arrays. Accessors allow retrieval by column name or index. This method ensures smooth data integration without modifying existing code structures, providing flexibility for adaptive strategies.
#MQL5 #MT5 #AlgoTrading #CSVParser

Read more...
❀14πŸ‘6πŸ€”2πŸ‘Œ2πŸ‘¨β€πŸ’»2
For effective trading management, integrating Discord notifications with MetaTrader 5 offers a practical solution for real-time remote monitoring. This setup allows traders to receive instant alerts for trade executions, market shifts, and other events. Configuring the MetaTrader 5 platform involves WebRequest settings and Discord webhook setup, requiring MQL5 programming skills. Secure handling of the webhook URL is crucial, as is ensuring network reliability through error handling strategies. Enhancing the integration with performance indicators and risk alerts increases its utility. Continuous testing and monitoring ensure robust functionality, making this integration a valuable tool for modern trading operations.
#MQL5 #MT5 #Trading #Integration

Read more...
πŸ‘18πŸ‘¨β€πŸ’»11❀7πŸ‘Œ2
The article outlines the process of using Adapter-tuning to fine-tune the GPT-2 model. This technique involves integrating adapter modules into different layers of the pre-trained model, offering a modular approach to fine-tuning. Adapter modules, functioning as independent neural networks, capture task-specific data distributions and can be trained separately from the original model. This approach enhances multi-task learning capabilities but introduces additional parameters, which may increase computational and storage requirements.

The process begins with creating an Adapter module, focusing on mapping input features to a bottleneck layer and then back to the original dimensions with dropout applied to prevent overfitting. Subsequently, the GPT2LMHeadModel class is rewritten to incorporate the Adapter module. This involves initializing the adapters based...
#MQL5 #MT5 #Adapter #GPT2

Read more...
πŸ‘26❀23πŸ‘¨β€πŸ’»9🀣4πŸ‘Œ2
The price increase indicator, designed to calculate range and price changes in percentage, has undergone a crucial update. As of December 13, 2024, a previously identified error in the last version has been addressed and corrected. This update ensures the accuracy and reliability of the percentage calculations for range and price changes. It is important for users to implement this update to maintain the integrity of their data analysis and decision-making processes. Ensuring tools are up-to-date with the latest corrections is essential for accurate technical analysis and informed strategy planning. All users are encouraged to verify that the latest version is deployed to avoid discrepancies in their calculations.
#MQL5 #MT5 #Indicator #Update

Read more...
πŸ‘28❀14πŸ‘Œ3⚑2πŸ‘¨β€πŸ’»1
Soft Actor Critic (SAC) is a reinforcement learning algorithm noted for its use of multiple neural networks: two critic networks and one actor network. These critic networks predict reward estimates (Q-values) based on input actions and environmental states, using the minimum of both outputs to adjust actor network losses. The actor network inputs environment states, outputting a mean vector and a log-standard-deviation vector to form a Gaussian probability distribution for action selection.

SAC's advantage lies in its handling of continuous action spaces, unlike Deep-Q-Networks (DQN), which suits discrete spaces. SAC's architecture allows for more efficient training, reducing overestimation bias while promoting exploration with its stochastic policy.

The inclusion of an entropy term in SAC's objective function fosters exploration, preventing p...
#MQL5 #MT5 #AI #ReinforcementLearning

Read more...
❀23πŸ‘16πŸ‘3πŸ‘Œ3πŸ‘¨β€πŸ’»3✍2
Explore the integration of Golden and Death Cross strategies with a Trend Constraint Expert Advisor to enhance algorithmic trading. These moving average crossovers, when automated in MQL5, allow traders to effectively capture market reversal points, improving precision and execution consistency. This approach ensures early detection of trend shifts, offering better entry points and synergy between trend-following and reversal strategies. The method involves developing independent Expert Advisors for each strategy, followed by careful melding into a unified system that adopts adaptive timeframes and flexible trading logic. Initial testing highlights areas for further optimization, paving the way for incorporating machine learning advancements in future iterations.
#MQL5 #MT5 #AlgoTrading #Strategy

Read more...
πŸ‘36❀22πŸ‘Œ3πŸ”₯2