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 K-Nearest Neighbors (KNN) algorithm, a straightforward yet powerful method for classification and regression. KNN relies on neighborhood proximity, assuming that similar data points cluster closely. Step-by-step, the algorithm selects the number of 'k' neighbors, calculates Euclidean distances, and votes on the classification. Key challenges include setting the optimal 'k' value and handling performance drawbacks, particularly with large datasets in trading applications. Despite these, KNN is effective for clearly labeled, smaller datasets, offering a robust approach to integrating machine learning with MetaTrader 5 for forex and stock predictions. Enhance your trades with data-driven insights using KNN.
#MQL5 #MT5 #KNN #AlgoTrading

Read more...
πŸ‘41❀29πŸ‘Œ6πŸ‘5πŸ†5πŸ‘¨β€πŸ’»5✍4
The "EuroSurge" Expert Advisor for MT4 presents a structured approach for managing trades on EURUSD 5-minute charts, incorporating multiple technical indicators for signal generation. Configurable trade size calculations are offered with options for fixed lot size, balance percentage, and equity percentage. Key input parameters include FixedLotSize, TradeSizePercent, and MagicNumber.

Indicator settings encompass Moving Averages, RSI, MACD, Bollinger Bands, and the Stochastic Oscillator. Each indicator can be enabled or disabled individually. Signal detection functions evaluate buy and sell criteria with conditions for each indicator, allowing for relaxed threshold levels compared to standard.

Trade execution includes placing orders with calculated stop loss and take profit using multipliers. Lot sizes are managed through a specialized function that adapt...
#MQL4 #MT4 #EA #AlgoTrading

Read more...
πŸ‘18❀17πŸ‘¨β€πŸ’»7πŸ‘Œ3
Streamline your trading strategy with a data-driven approach using enhanced visualization techniques. By transforming raw market data into intuitive, interactive charts like dynamic candlestick overlays and heat maps, traders gain deeper market insights, facilitating informed decision-making. Connect MetaTrader 5 with Python to automate data collectionβ€”efficiently using pandas for analysisβ€”and visualize trends using advanced plotting techniques. Implement reinforcement learning models, like Deep Q-Networks, to predict trading moves by evaluating historical XAU/USD data. Establish socket communication between MQL5 and Python for seamless trade execution. This sophisticated integration reduces human error and enhances trading precision, optimizing entry and exit points for maximized performance.
#MQL5 #MT5 #DataViz #AITrading

Read more...
❀23πŸ‘8πŸ‘Œ2πŸ‘¨β€πŸ’»2
Creating an Expert Advisor (EA) for the Daily Range Breakout strategy in MetaQuotes Language 5 (MQL5) enables traders to automate trading based on breaking key price levels formed from the previous day's range. This strategy relies on capitalizing on significant price movements beyond identified support and resistance levels, typically observed on 1-hour or 4-hour charts, reducing noise and capturing major trends.

The fundamental steps involve setting the daily high and low price as potential breakout points. A long position is triggered when price moves above the previous day's resistance, while a short position follows a breach below support. Incorporating a stop-loss to manage risk, it's critical to optimize and backtest the EA to ensure it aligns with trading objectives and adapts to various market conditions.

Implementation in MQL5 requires defining an...
#MQL5 #MT5 #EA #Strategy

Read more...
❀25πŸ‘18πŸ‘Œ3πŸ’―2πŸ”₯1πŸ‘1
Starting December 1, 2024, the minimum supported versions of the trading platforms will be:

β€’ MetaTrader 4 build 1420 released on May 24
β€’ MetaTrader 5 build 4410 released on June 21

After this date, older versions of desktop terminals will not be able to connect to broker servers.

In the past six months, we have released four MetaTrader 5 updates:

βœ“ Build 4410: Fixed crashes in the desktop platform, browser compatibility checks, and demo account opening in the web version.
βœ“ Build 4570: Crosshair mode, line chart and Market Watch setting in the web version, OpenBLAS library for matrix computations and improved ONNX support in MQL5.
βœ“ Build 4585: Fixed crashes during debugging and testing of MQL5 programs, as well as memory leaks during compilation.
βœ“ Build 4620: Extended OpenBLAS support, fixed tick history queries.

Each MetaTrader 4 version comes with performance improvements and bug fixes.

Download the latest version to take advantage of new features
πŸ‘74❀36πŸ”₯9πŸ‘5πŸ‘Œ4
CandlesticksData script, developed for MetaTrader 5, facilitates the transfer of detailed candlestick data into a CSV file. Its primary function is to structure this data across various timeframes, aiding in quantitative analysis, strategy backtesting, and educational exploration. Traders can leverage this for informed decision-making by recognizing trends, patterns, and market behaviors. The script allows integration with external software for advanced analyses, including statistical or machine learning applications.

Upon initialization, it defines properties and sets variables, supporting timeframe selection from minutes to months. Data collection is executed within the OnStart function, gathering key metrics: Open, High, Low, Close prices, tick volume, total volume, spread, and candlestick characteristics such as size and type. Captured data is fo...
#MQL5 #MT5 #Script #DataAnalysis

Read more...
πŸ‘31❀13πŸ‘¨β€πŸ’»4πŸ‘Œ2
Delve into Smart Money Concepts (SMC) and Order Blocksβ€”key chart areas where institutional traders execute large trades, sparking significant price movements. This gives retail traders a strategic edge by aligning with institutional flows. By harnessing tools like Fibonacci retracement, traders can refine entry points, enhance trade accuracy, and monitor price action. Detect Bullish/Bearish Order Blocks using simple candles logic. Leveraging the 61.8% Fibonacci level ensures alignment with institutional activity. The integrated Expert Advisor automates these strategies, continuously scanning the market for market structure, helping traders achieve systematic, high-probability trades mirroring institutional strategies.
#MQL5 #MT5 #SMC #AlgoTrading

Read more...
πŸ‘27❀19πŸ‘¨β€πŸ’»3πŸ‘Œ2πŸ”₯1
Enhancing our MQL5 dashboard panel with interactive components is the next critical phase. Following an initial static setup, focus shifts towards automating button functionalities to ensure an intuitive user interface. The goal is to create a dynamic trading tool by setting up events that trigger actions upon user interaction.

We will automate various buttons for trading operations such as "Open Buy", "Sell", and others needed for market engagement. Additionally, automation extends to closure and information buttons providing account details. The "OnTick" event handler will update account information in real-time.

"OnChartEvent" will handle user interactions, including mouse movements and button clicks. Implementing this structure will streamline the trading process within the MetaTrader 5 environment, enhancing user experience.
#MQL5 #MT5 #automation #AlgoTrading

Read more...
πŸ‘40❀32πŸŽ‰3πŸ‘¨β€πŸ’»3πŸ‘Œ2πŸ€”1🀯1
The Saucer signal from the iAO (Awesome Oscillator) is an analytical tool that detects potential market momentum shifts. This indicator focuses on three consecutive bars: a down bar followed by two upward bars, to spot changes in the trend. An added layer of analysis is provided with the integration of iMA (Moving Average), which serves as a filter to refine the signal's accuracy. The MA component helps verify that the identified trend shift aligns with broader market movements. The visualization involves the MA AO Arrow image, illustrating points where the conditions for the Saucer signal align with the Moving Average filter. This combination of indicators seeks to enhance decision-making by providing clearer insights into market trends.
#MQL5 #MT5 #Indicator #Trading

Read more...
πŸ‘20❀10πŸ‘¨β€πŸ’»6πŸ†4πŸŽ‰3πŸ‘Œ1
The article explores FEDformer, a cutting-edge model designed to enhance long-term time series forecasting. By integrating seasonal trend decomposition and Fourier analysis into the traditional Transformer architecture, FEDformer aims to improve prediction accuracy while reducing computational complexity from quadratic to linear. The model effectively captures global properties of time series by selectively using both low and high-frequency components, validated by extensive experiments showing performance improvements by 14.8% for multivariate and 22.6% for univariate forecasting. This innovative approach provides practical benefits for MetaTrader 5 developers, offering more efficient and accurate trading algorithms.
#MQL5 #MT5 #Algorithm #TimeSeries

Read more...
❀18πŸ‘17πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸ‘2🀣1
Implementing efficiency improvements and integration strategies in technical design can streamline processes and enhance system performance. Recent updates to the MetaTrader 5 replay/simulator system involve restructuring code to eliminate redundant components and enhance stability. The control indicator has been integrated directly into the simulator service, removing its visibility from user-accessible indicator lists. This change offers improved control over system resources and operational environments.

Compilation challenges often arise during such substantial code revisions. The MQL5 platform may not fully support MAKE compilation systems, necessitating careful attention to dependency management and incremental code changes. Addressing compilation errors requires an iterative approach, focusing on primary errors and gradually resolving subseque...
#MQL5 #MT5 #Indicator #Algorithm

Read more...
πŸ‘23❀9πŸ‘Œ3πŸ‘¨β€πŸ’»3
Financial time series prediction often utilizes dimensionality reduction techniques due to high feature correlations. While PCA is commonly employed, it can dilute individual variable impact, complicating tasks like feature selection. To tackle this, Forward Selection Component Analysis (FSCA) offers a more refined method by selecting variables based on their unique variance contribution. FSCA's backward refinement step further optimizes variable choice by replacing less important ones, enhancing model accuracy without sacrificing step order. These techniques empower traders and developers to build more transparent and effective algorithmic trading models, highlighting how FSCA addresses PCA's limitations in highly correlated datasets.
#MQL5 #MT5 #Algorithm #FeatureSelection

Read more...
πŸ‘40❀25⚑5πŸ†5πŸ‘¨β€πŸ’»4🀣3πŸ‘Œ1
A prototype script has been developed to aggregate data from EconomicCalendar functions, outputting the information into a text file. The output is formatted as a list of dictionaries, each representing an event collected over a specified time period. This script serves as a preliminary test solution for users of the PythonAPI, providing access to identical data. In this initial version, all variables are statically declared, allowing for straightforward testing and validation. The service is positioned as a temporary solution, aiming to facilitate early-stage exploration and integration of economic data into broader applications. Effective data handling strategies will be key in further development stages.
#MQL5 #MT5 #script #PythonAPI

Read more...
❀19πŸ‘9πŸ‘¨β€πŸ’»3😎2⚑1πŸ‘Œ1πŸ€“1
Two-Factor Authentication (2FA) improves security by requiring two forms of verification, reducing unauthorized access risks. Its implementation in an Admin Panel involves incorporating a second verification layer beyond passwords. MQL5 projects benefit from this by adding an OTP code that is sent to a user’s Telegram account for authentication.

Integration involves creating GUI elements for password and 2FA code input, using secure algorithms for code generation, and testing functionalities. Using Telegram API for delivering codes ensures real-time verification, although keeping security practices robust on shared devices remains crucial.

This approach significantly heightens user trust and data protection, optimizing application security in dynamic environments.
#MQL5 #MT5 #2FA #AlgoTrading

Read more...
❀39πŸ‘33πŸ‘Œ8πŸŽ‰4πŸ‘¨β€πŸ’»2😁1
A new function facilitates trade monitoring via notifications for important trade events. It alerts users about trade openings and closures and provides details such as trade type and lot size for new trades. Profit and loss information for closed trades is also displayed. This utility works seamlessly in both live trading and strategy testing environments, sending feedback to logs when tested.

For efficient use, integrate this function into your Expert Advisor (EA) or script, and enable push notifications on the MetaTrader platform. It’s crucial to configure the MetaTrader mobile application to receive alerts.

This function is tailored for netting accounts and does not support hedging scenarios where multiple positions per symbol might be open. Adjustments are needed for hedging functionality.

The recent trading history, covering the past ...
#MQL5 #MT5 #Notifications #ExpertAdvisor

Read more...
❀21πŸ‘16πŸ‘¨β€πŸ’»4πŸ”₯2⚑1🀯1πŸ‘Œ1
The article delves into using the Average True Range (ATR) and ADX indicators for algorithmic trading in MetaTrader 5, focusing on innovative pattern detection and implementation in MQL5. It highlights using ATR for volatility breakout signals, offering advantages like adapting to market conditions for dynamic exits over fixed thresholds. The implementation tracks price against ATR to trigger trade signals, ensuring robust, real-time market responsiveness. The ADX is explored for identifying trend reversals and support/resistance breakouts, employing Bollinger Bands integration. The discussion emphasizes practical testing, suitable for optimizing trading strategies and delivering refined market insights for traders and developers.
#MQL5 #MT5 #Volatility #Strategy

Read more...
πŸ‘16❀10πŸ‘¨β€πŸ’»4✍2πŸ‘€2πŸ‘Œ1
Dive into neural networks with this insightful article! It simplifies the process of generating equations to represent dataset patterns, leveraging analytical mathematics and algebraic computation. By avoiding complex math, it focuses on practical coding in MQL5 to create linear functions for static datasets. Gain insight into constructs like slope and intercept while managing variables efficiently through matrix operations. Emphasizes practical data representationβ€”whether linear or quadraticβ€”demonstrating flexibility in adapting data types and volumes. Perfect for traders and developers looking to bridge the gap between theoretical math and real-world application in algorithmic trading.
#MQL5 #MT5 #NeuralNetworks #AI

Read more...
πŸ‘23✍13❀9πŸ‘¨β€πŸ’»5⚑3πŸ‘Œ1
The Expert Advisor featured here evaluates indicator buffer signals, specifically focusing on OsMA Four Colors Arrow EA. This particular advisor utilizes a well-documented trading engine, thoroughly detailed in the RSI Dual Cloud EA code. The strategy involves analyzing multiple data points within these indicators to make informed trading decisions. The use of OsMA indicators aims to enhance the accuracy of signal reading, while the integration with the Four Colors Arrow functionality aids in identifying potential market opportunities. The dual cloud approach of RSI further supports multi-layered analysis, resulting in a robust strategy framework tailored for sophisticated market assessment.
#MQL5 #MT5 #Strategy #EA

Read more...
❀28πŸ‘23πŸ‘¨β€πŸ’»4πŸ‘Œ2⚑1πŸ†1
Starting a new development focused on the SplitContainer control from MS Visual Studio toolkit. This control, known for its two-panel design separated by a movable separator, relies on a completely transparent base container. The panels are descendants of the CContainer class and feature a static setup with default parameter values, including a vertical separator positioned at 50 pixels from the edge and a separator width of 4 pixels. By default, the panels adopt a Fixed3D frame type.

Enhancements include adding new WinForms object types, macro substitutions for background and border colors, and properties for Integer graphical elements. Enumeration for non-resizable panels is specified, and graphical element sorting by new properties is facilitated. Methods returning descriptions of new graphical elements and properties are implemented.

The aux...
#MQL5 #MT5 #SplitContainer #WinForms

Read more...
πŸ‘38❀20πŸŽ‰5πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸ‘€2
For those interested in translating Pine Script to MQL5, it's essential to adopt a functional and structured approach. Begin by examining the logic behind the Pine Script and identifying its core functions and variables. Next, understand the corresponding MQL5 functions and how they can replicate Pine Script capabilities. Pay close attention to differences in syntax and function calls. The goal is to maintain the script's original functionality while ensuring compatibility within MQL5. Consider leveraging available online resources or forums where examples and discussions on such conversions are shared, providing further insights and practical advice. Always test the MQL5 code thoroughly to ensure it performs as expected.
#MQL5 #MT5 #Conversion #Algorithm

Read more...
πŸ‘31❀22⚑2πŸ‘€2πŸ†1πŸ‘¨β€πŸ’»1