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
Introducing a grid-based system designed for traders seeking to effectively manage order placement. This expert advisor facilitates the creation of an order grid without relying on martingale strategies, offering flexibility with standard, lite, or full martingale options. Users are encouraged to conduct tests to identify optimal settings, as default configurations serve merely as a foundational guide to the system's operations.

The expert supports both aligned and opposing order grid configurations. When facing significant losses, the hedge mode option is available for added control. Given the inherent high-risk nature of this strategy, it is advisable to perform initial tests in a demo trading environment to evaluate performance and stability.

πŸ‘‰ Read | VPS | @mql5dev

#MQL4 #MT4 #EA
❀36πŸ‘€4⚑2πŸ‘1πŸ‘¨β€πŸ’»1
A new expert advisor has been developed to assist traders in creating an order grid. The system avoids martingale, lite martingale, and full martingale methods, offering straightforward operation. Users are encouraged to conduct their tests to determine optimal settings. Default settings serve as an initial guide for comprehension. The expert allows configuration to build either conforming or opposing order grids. Additionally, a hedge mode is available to manage significant losses. The strategy is noted for its high-risk potential. It is advisable to first evaluate its performance on a demo account to ensure thorough understanding before full deployment.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #EA
❀30πŸ‘Œ5πŸ‘¨β€πŸ’»3
Navigating multi-pair trading can be challenging due to varying volatility. This article addresses these issues by leveraging a dynamic Expert Advisor (EA) that incorporates volatility-based risk management. By using tools like Average True Range (ATR) and dynamic risk-based sizing, the EA adjusts trade parameters according to market conditions. This ensures consistent risk management and improved performance across diverse currency pairs. Key features include multi-symbol handling, volatility-driven risk tiers, and real-time adaptability to market shifts. Practical for both traders and developers, this EA mitigates risk in volatile markets while optimizing opportunities in stable environments, providing a comprehensive strategy for more predictable outcomes.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀35πŸ†4πŸ‘¨β€πŸ’»4
Discover the SAMformer framework, an innovative approach to overcoming traditional Transformer limitations in long-term multivariate time series forecasting. By leveraging a shallow architecture, SAMformer reduces computational complexity and addresses overfitting. The core feature, Sharpness-Aware Minimization (SAM), enhances model robustness against parameter variations, significantly improving prediction quality. SAMformer's high accuracy with fewer parameters supports efficient deployment in resource-limited environments, finding applications in finance, healthcare, and more. Recently, SAM optimization was integrated into the convolutional layer, simplifying implementation while retaining functionality. This progress marks a significant step toward advanced, scalable Transformer models.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #AITrading
❀62πŸ‘7πŸ‘¨β€πŸ’»7😈2
An Expert Advisor (EA) is designed to operate on the principles of Bollinger Bands price crossings. It monitors the market for instances where the price interacts with the lower and upper bands. This functionality allows the EA to make informed decisions on potential trade entries and exits. Additionally, it automates the setting of Stop Loss (SL) and Take Profit (TP) levels. The integration of Bollinger Bands with automatic SL and TP options supports potential risk management and trading strategy execution. This EA may be utilized to efficiently manage trades by leveraging technical analysis indicators endemic to the financial markets.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL4 #MT4 #EA
❀27πŸ‘4πŸ‘Œ3✍1πŸŽ‰1
Algorithmic traders often encounter issues with static rule-based systems that struggle with dynamic markets. Most Expert Advisors (EAs) lack adaptability to volatility and unforeseen patterns. By utilizing adaptive learning and Python, reinforcement learning models can evolve with market conditions. Python libraries such as PyTorch and Gym enable advanced processing and environment simulations. A trained model can be exported to ONNX for MQL5 deployment.

Initiate by connecting Python to MetaTrader 5 for historical data retrieval. Define your date range and use `mt5.copy_rates_range()` for data extraction. Ensure data consistency across time zones with UTC. Analyzing and cleaning data ensures accuracy for algorithmic processing and includes using tools like StandardScaler.

Develop a custom OpenAI Gym and Dueling DQN for reinforcement learning. Use bu...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀36πŸ‘3πŸ‘¨β€πŸ’»3⚑1
The development of a trendline trading system using MQL5 introduces an advanced mechanism for automated trading based on technical trendline analysis. Building on previously implemented systems, this iteration employs a least squares fit to establish support and resistance trendlines. These lines trigger buy and sell signals when prices intersect them, enhanced with visual indicators and adjustable trade parameters for clarity and efficiency.

Implementing this system involves designing a framework for trendline detection and management within MQL5, requiring the setup of input parameters and structures to enhance the dynamism of the trading program. This setup enables precise execution of trades while adhering to robust risk management protocols.

Through comprehensive backtesting processes, this strategy ensures reliable performance under various mark...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Algorithm
❀67πŸ‘11πŸ”₯8πŸŽ‰2πŸ†2πŸ‘¨β€πŸ’»2πŸ‘€1
The ATR% is a volatility indicator expressed as a percentage, showing the average true price range over a specific period. Unlike basic measures that only consider daily highs and lows, ATR% includes price gaps for a more comprehensive analysis. A reading of 100% represents the maximum potential volatility of the asset. In lower timeframes, ATR% typically remains below 3%, whereas higher timeframes can yield larger values. The calculation uses the formula: ATRP = ATR / close * 100. Here, ATR represents the average largest price spread over a given period, and close stands for the current asset price.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Indicator
❀48πŸ‘3πŸ‘¨β€πŸ’»3
Multivariate time series forecasting is critical in fields such as meteorology, energy, anomaly detection, and financial analysis. Recent advancements in artificial intelligence have yielded sophisticated models to enhance forecasting accuracy. Transformer-based architectures, known for effectiveness in NLP and computer vision, are valuable in time series forecasting. These models, when pre-trained on large datasets, significantly boost predictive performance.

Despite their complexity, simple linear models effectively compete with their Transformer-based counterparts, often preferred due to lower complexity and reduced overfitting risk. They efficiently capture stable patterns with even limited data. The PatchTST approach introduces patching techniques for local semantics extraction, highlighting scope for efficiency improvements with channel-ind...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #DeepLearning
❀70πŸ‘¨β€πŸ’»7πŸ‘6πŸŽ‰3
The described indicator allows for customization in defining fractals, where users specify the number of bars forming the structure. In this setup, using 5 bars to the left and 2 bars to the right constructs a fractal pattern representing a top or a bottom. This approach provides flexibility in identifying key price reversal points effectively within market analysis. Adjusting the count of bars tailors the sensitivity and frequency of fractal signals. Implementing such a tool can enhance analysis precision, especially in recognizing pivotal market movements. Users can adapt settings based on their specific trading strategies and market conditions.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀35πŸ‘¨β€πŸ’»6πŸ‘2✍1πŸŽ‰1🀨1
Sorting a list of structures by a specific field is a fundamental task in programming. Different algorithms can accomplish this, each with unique characteristics. Quick Sort and Merge Sort are efficient algorithms commonly used for this purpose. Quick Sort works by partitioning the data and sorting the partitions independently. Merge Sort divides the list into smaller sublists, sorts them, and then merges them back together. Both offer reliable performance in various scenarios.

Customization may be required based on specific use cases. The sort can be tailored to accommodate different data types and sorting criteria. Understanding the mechanisms of these algorithms can aid in effectively organizing data structures. Implementing these algorithms requires a clear grasp of their operation and adaptability for specific sorting needs.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #algorithm
❀33πŸ‘4πŸ‘¨β€πŸ’»2✍1
New Indicator Overview: Introducing an advanced custom indicator combining Bollinger Bands with actionable Buy/Sell arrows. This tool automatically tracks market movements, signaling potential reversal points when prices interact with the bands' thresholds. Calculations are done using the iBands function.

Operational Details: The indicator provides a Buy signal when a blue arrow appears after a candle closes below the lower band and then above it. A Sell signal is marked by a red arrow following a candle closure above the upper band and then below it. Arrows are only displayed once per signal direction until reversed, avoiding excessive signals.

Indicator Options: Users can customize the display of the Bollinger Bands and adjust parameters such as period, deviation, and price type. It is compatible across symbols and timeframes, employing non-repaint...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀26πŸ‘€9πŸ‘3⚑1πŸ‘¨β€πŸ’»1
Explore the intricate workings of the DispatchMessage procedure in the C_ChartFloatingRAD class, vital for MetaTrader 5's Chart Trade operations. This procedure handles events without creating objects, focusing on managing MetaTrader 5's responses. Delve into the mechanics of event handling, particularly the CHARTEVENT_CHART_CHANGE and CHARTEVENT_MOUSE_MOVE events, ensuring optimized MetaTrader 5 performance. Discover practical insights on managing complex data within strings, crucial for transmitting significant information efficiently. This detailed exploration offers invaluable guidance for developers enhancing their algorithmic trading systems, optimizing event-driven architecture in algorithmic trading and improving interaction with trading interfaces.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀32πŸ‘Œ5⚑3πŸ‘3πŸ‘¨β€πŸ’»2
The integration of Python with MQL5 offers an advanced framework for algorithmic trading, overcoming several common challenges. This hybrid system directly interfaces MetaTrader 5 with Python for seamless data flow and machine learning operations without relying on manual data handling. By utilizing Python's advanced feature engineering and native libraries, the system ensures real-time signal generation based on comprehensive data analysis.

The architecture simplifies complexity by allowing Python to act directly as a MetaTrader 5 client, facilitating efficient data ingestion and computation. MQL5 handles user interaction and trade execution through an Expert Advisor, ensuring minimal latency and real-time processing.

This system enables automated, statistically-backed trading, comprehensively addressing data fragmentation, delayed insights, and inconsist...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #EA
❀30πŸ‘4✍3πŸ‘¨β€πŸ’»3
Master the art of using definitions in MQL5 to enhance algorithmic trading capabilities. The article delves into the effective use of compilation directives, exploring #define and #undef to control code execution and improve performance. Learn how to utilize these tools to modify code safely and swiftly, allowing for seamless integration of complex functionalitiesβ€”like importing external C/C++ code into MetaTrader 5. Ideal for developers looking to streamline coding processes without sacrificing speed. Discover how these techniques can facilitate version control and improve code granularity, offering practical insights for both beginner and seasoned programmers in the meta-trading ecosystem.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Programming
❀27⚑2πŸ‘2πŸ‘¨β€πŸ’»2πŸ‘Œ1
The article discusses advanced techniques for implementing the PSformer framework, a transformative approach in the algorithmic trading domain, using MetaTrader 5. Emphasized are innovative features such as the Parameter Sharing (PS) mechanism and Spatial-Temporal Segmented Attention (SegAtt), which enhance prediction accuracy by organizing multidimensional time series into segments. This structure facilitates effective spatial-temporal relationship identification, essential for high-performance forecasting. The article highlights the methodical approach to implementing the PSformer Encoder using MQL5, focusing on efficient data handling through transposition layers and parameter-sharing blocks. Key benefits include a reduction in overfitting risks and computational efficiency, demonstrating notable performance in trading algorithms.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #AI
❀21πŸ€”4⚑3πŸ‘¨β€πŸ’»2πŸ‘1
Technical indicators are critical tools for market analysis. They convert complex data into graphical formats, aiding strategic planning and timely decision-making. These automated systems update with real-time market data, eliminating manual recalculations and ensuring current analysis. Indicators vary widely: some highlight trends and assess market volatility, while others focus on trading volume dynamics. Utilizing these tools ensures decisions are based on objective data, not just intuition.

A new oscillator synthesized from the Parabolic SAR and Fractal indicator combines trend direction with price extremes to measure market momentum and volatility. This approach offers a structured framework for developing advanced trading strategies.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀33πŸ‘¨β€πŸ’»5⚑3πŸ‘2πŸ‘Œ1
A new library enables enhanced testing of Expert Advisors in MT5's mathematical mode. To activate math trading capability in your EA, include a specific line of code and permit DLL usage, ensuring safety via open-source code.

Initially, execute a single EA pass to save ticks with the defined input parameter. Post-execution, consult the log for tick-saving confirmation. Subsequently, proceed with EA running in both trading and math modes within the MT5 Tester. Relevant data will be available in the Tester's log.

The performance metrics display optimization capabilities in different modesβ€”real ticks (pips), real ticks with a virtual setup, and mathematical. The increased speed of the math mode is evident.

The library boosts MT5 testing efficiency substantially with two significant indicators: heightened performance and minimal memory usage. Specific libraries...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀31πŸ‘9πŸ‘¨β€πŸ’»3πŸ‘€2
This post highlights a technical tool for traders dealing with multiple currency pairs. The indicator measures the correlation between two chosen pairs. Its settings include SecSymbol, Type, and iPeriod. SecSymbol specifies the second symbol for correlation. Type determines the correlation method employed. iPeriod sets the indicator's timeframe. This tool helps traders assess divergence and convergence between two symbols. Such analysis can be crucial for informed trading decisions. By understanding the relationship between different currency pairs, traders can better anticipate market movements and optimize their strategies accordingly.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀26πŸ‘3πŸ‘¨β€πŸ’»2⚑1πŸ‘Œ1
Explore the power of the Stochastic Oscillator in MetaTrader 5 for algorithmic trading. The article introduces the Stochastic Oscillator, a key indicator in technical analysis, which assesses the relationship between current closing prices and their historical range. Learn to leverage its %K and %D lines for market trend detection. Discover practical strategies for uptrend, downtrend, and sideways markets, and see how these strategies transition into trading systems through MQL5 coding. This integration enables automated, emotion-free trading, allowing precise execution of trading strategies. Ideal for traders and developers looking to enhance their trading systems using advanced technical indicators.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀56πŸ‘8✍4πŸ‘¨β€πŸ’»3