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 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
Customize your chart analysis by adding high and low lines based on a specific number of previous bars. Utilize an input field to define the desired number of bars for calculating the lines. This feature allows for precise control over the range of historical data considered, enhancing the accuracy of trend assessments. Adjust the number of bars in the settings to tailor the analysis to the requirements of the trading strategy or technical analysis approach. This flexibility fosters a more informed decision-making process by allowing for detailed examination of past market prices, providing valuable insights into potential support and resistance levels.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀26πŸ‘6πŸ‘¨β€πŸ’»2πŸ‘1πŸ‘Œ1
Explore the power of the CCanvas class in MQL applications for versatile graphics handling. Essential for advanced UI designs, CCanvas provides direct pixel manipulation capabilities on MetaTrader 5 charts. This tool equips developers with methods to skillfully create, modify, and manage visual elements such as UI components, images, and indicator overlays. By organizing pixel data into an array, developers can implement comprehensive chart interactionsβ€”drawing lines, shapes, and text via versatile algorithms including antialiasing and BΓ©zier curves. Practical for both traders and developers, CCanvas ensures high customization and control for dynamic algorithmic trading environments.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #CCanvas
❀43πŸ‘10πŸ”₯4🀣3πŸ‘¨β€πŸ’»3πŸ‘€3πŸ†2
An expert advisor simplifies trade management effectively with specific functionalities. Automatic setting of take profit and stop loss based on pre-defined parameters enhances efficiency. Implementing an auto trailing stop ensures adaptability across any device placed order. The functionality to close all trades for the current symbol streamlines the trading process.

Usage involves adding the expert advisor to any symbol and configuring essential variables like take profit, stop loss, and trailing settings accordingly. There is no dependency on specific magic numbers, allowing orders placed on mobile devices to be modified by the EA. For currency symbols, standard pip values are used, while adjustments are necessary for XAUUSD and Boom/Crash synthetic symbols.

Efficient setup examples are available for XAUUSD and other currencies like EURUSD to enhance tr...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀39πŸ‘¨β€πŸ’»5πŸ‘Œ2
Dive into the world of algorithmic trading with the MACD indicator, a powerful tool for identifying market trends and momentum. Understand the calculation of MACD using exponential moving averages, and discover how its componentsβ€”the MACD Line, Signal Line, and Histogramβ€”help traders discern bullish or bearish market conditions. Learn how simple strategies, like MACD line crossovers with the zero-level and Signal Line, can provide actionable trading signals. This guide also covers designing trading systems in MetaTrader 5 with MQL5, showcasing practical applications for both developers and traders aiming to enhance their trading performance with automated insights.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Trading
❀75πŸ‘7✍4πŸ‘¨β€πŸ’»4⚑3πŸŽ‰3πŸ‘Œ1
Breakout Trader 1.0 is a tool designed for trading breakouts from established ranges, executing according to specific trading times. Key settings include start date configuration, magic number, and initial capital. Volume input and risk percentage per order offer customizable risk management. Users can toggle reverse trading and opt for automation during the day.

Additional parameters such as negative orders per day, profit formulas, and stop-loss techniques are available. The software allows trailing stops and tailors take-profit strategies based on equity levels. Partial sells and monthly trade settings provide further flexibility.

Users can configure trading days and times, with options to pause or end trading based on daily or weekly capital performance. Panel and design settings ensure the tool is user-friendly. Testing in demo accounts is advised...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Trading
❀37πŸ‘6πŸ‘¨β€πŸ’»4πŸ‘Œ2πŸ€”1
Explore the intricate world of MQL5 programming with this engaging guide to utilizing the #define directive for inline macros. Discover how to transform repetitive code into efficient procedures, saving both time and space in your projects. Learn the art of passing arguments to macros, a powerful yet cautious approach to enhance your algorithmic trading scripts. Mastering these techniques ensures optimized code performance, crucial for high-frequency trading strategies. By understanding the subtle differences in compiler behavior, programmers can achieve faster execution while minimizing memory usage. This knowledge is pivotal for developers seeking to deepen their understanding of resource management in MetaTrader 5.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Macro
❀26πŸ‘3πŸ‘¨β€πŸ’»2
Explore the vital role of floating-point numbers in MQL5 programming. Understanding them is crucial for accuracy in financial calculations. This knowledge forms the foundation for more advanced topics, such as function overloading. Discover how overloading enhances code readability by allowing multiple functions with the same name but different parameters or types. Learn the importance of proper parameter selection to avoid compilation errors and ensure precise execution flow. Through insightful examples, gain clarity on generating concise, effective trading algorithms. Perfect your programming skills with a solid grasp of these fundamental concepts, paving the way for building sophisticated trading tools.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Programming
❀24πŸ‘2πŸ‘¨β€πŸ’»2
Floating-point numbers in programming, especially in MQL5, are critical to understand for precise computations. Although double and float are commonly used, they often carry hidden complexities due to their design based on the IEEE 754 standard. This standard aims to unify floating-point representation but introduces potential errors due to rounding. MQL5, like many programming languages, uses the IEEE 754 to standardize calculations but the way floating-point values are storedβ€”either in single (32-bit) or double precision (64-bit)β€”can affect computation accuracy, especially in the high-stakes world of algorithmic trading. Understanding this can help avoid costly errors in calculation-critical environments.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Floats
❀34πŸ‘¨β€πŸ’»4πŸ‘3😈1
Overloading functions plays a crucial role in programming, allowing flexible code execution across different contexts. Novices often find this concept daunting due to its complexity and its essential role in developing scalable applications. While overloading is sometimes seen as a source of complexity, it is indispensable for creating advanced solutions, making it a critical skill for any serious programmer. Programs and applications would lack versatility without overloading, limiting their functional capabilities.

Templates and novel data types like typename offer more advanced solutions. They enhance how functions handle various data types without duplication. Familiarity with both basic and fundamental concepts of these mechanisms in code development is vital. Striking the balance between understanding simple and complex code syntax ensures cl...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Programming
❀53πŸ‘€7πŸ‘Œ4πŸ‘¨β€πŸ’»3πŸ‘2πŸ‘Ύ2
An efficient method for monitoring price movements involves implementing popup or push alert notifications on manually placed horizontal lines. This technique ensures that the system alerts users whenever the price touches these set lines. Once the price interaction occurs, these lines are designed to automatically delete themselves and reset, maintaining an organized and uncluttered visualization. This feature is beneficial for traders seeking immediate updates on critical price levels without manual oversight. Developing this approach requires utilizing programming skills to customize alerts and manage line deletions, thus enhancing the user experience by providing real-time notifications and streamlined chart management.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Alert
❀32πŸ‘8πŸ‘¨β€πŸ’»4
Discover the power of the Pin Bar Averaging strategy, designed for MetaTrader 5 developers. Dive into automated trading by capitalizing on pin bar candlestick patterns, known for signaling price reversals. This system uses MQL5 to identify these patterns and implements an averaging strategy to manage trades dynamically. It incorporates trailing stops and breakeven adjustments, enhancing trade management during market changes. The integration of a real-time monitoring dashboard provides critical trade metrics and visual indicators like support and resistance levels. Understand, implement, and backtest this robust trading strategy to tailor it for your algorithmic trading needs.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #PinBar
❀40πŸ‘7πŸ‘Œ4😁3πŸ‘¨β€πŸ’»2⚑1πŸ†1
Matrix factorization offers powerful tools for building numerically driven trading applications. Progressing from regression tasks, focus now shifts to classification problems. Developing a market classifier that distinguishes market movements involves learning from past market data to guide trading decisions.

The classifier anticipates market trends based on moving average behaviors. For sell positions, both price and moving average should fall. For buy positions, both should rise. The model predicts two separate binary outcomes.

System definitions, user inputs, and global variables are essential for functionality. Important methods include setup and findSetup, handling data inputs and predictions. Employing Singular Value Decomposition (SVD) allows optimal coefficient determination.

Developing a classification model involves standardizing inpu...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀73πŸ‘Œ6πŸ‘4πŸ”₯3πŸ‘¨β€πŸ’»3🀑2πŸ‘€1
Developers working with MetaTrader 5 often encounter a challenge with symbol names mismatching broker-specific conventions. This issue affects the functionality of configurable Expert Advisors (EAs), especially those implementing multi-symbol strategies. The common problem arises when users fail to align the EA settings with their broker's symbol nomenclature. For example, if an EA is configured with "EURUSD" and the broker lists it as "EURUSD.i" or "EURUSD.m", the EA fails to identify and trade the symbol.

A Levenshtein distance algorithm can address this issue by identifying the most similar symbol name in the Market Watch window. This reference script can be integrated into EAs and scripts, allowing them to automatically adapt to various broker symbol names. It's especially useful during the development and testing phases for configuration validation, en...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #EA
❀40πŸ‘6πŸ‘¨β€πŸ’»3πŸ‘Œ2✍1