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
MetaTrader 5 beta build 4695 introduces new features in the MQL5 language, including support for additional OpenBLAS library functions, as well as the new TransposeConjugate and CompareEqual functions. These enhancements provide even greater flexibility for matrix and vector operations.

We've also resolved compatibility issues with the MQL5 integration package for Python. The package is now fully compatible with all Python versions up to 3.13.

Additionally, we've optimized and accelerated platform operations involving price data, improved the account opening dialog, and corrected the display of position values.

Read more...
πŸ‘59❀18πŸ‘Œ6⚑5πŸ”₯3πŸ‘¨β€πŸ’»2✍1
A recent project involved converting an Excel-based calculation method by Yousufkhodja Sultonov into MQL4. The calculations are directly adapted from an Excel file, detailed within commented lines in the code to match the corresponding Excel cells. The indicator in focus comprises three lines: P1, P2, and P3. These lines are crucial for the price forecast, with P3 acting as a pivotal trajectory marker. During significant upward or downward market movements, these lines tend to converge, signaling potential shifts. Further insights into the indicator's functionality and discussions can be found in related forums. The adaptation ensures a seamless transition from Excel to MQL4, offering practical applications in financial analytics.
#MQL4 #MT4 #Indicator #AlgoTrading

Read more...
πŸ‘17❀14πŸ‘¨β€πŸ’»9😱1πŸ‘Œ1
The SUPERMACBOT is designed for traders seeking a reliable automated solution. It integrates the Moving Average Crossover strategy with the MACD Indicator, providing precise trade signals. This Expert Advisor adapts to all symbols and timeframes, suitable for varied market conditions.

Key features include a dual strategy framework, ensuring trend reversal detection and opportunity analysis. It offers signal validation using the MACD line, Signal line, and Histogram. Multi-timeframe compatibility supports scalping, day trading, and swing trading.

Risk management is robust with customizable Stop Loss and Take Profit levels. Trailing Stop functionality maximizes profits. Highly configurable with parameters for Moving Averages and MACD settings, it simplifies execution with minimal setup. Ideal for traders aiming to automate and optimize their strategies wit...
#MQL5 #MT5 #EA #AlgoTrading

Read more...
πŸ‘21❀7πŸ‘Œ3πŸ‘€2πŸ”₯1πŸ‘¨β€πŸ’»1
A new tool has been developed to simplify price action analysis and enhance market assessment efficiency. By leveraging the concept of a chart projector, this tool offers traders crucial market insights via a single script execution, eliminating the need to navigate the chart extensively. Key metrics displayed include previous day's open and close prices, significant support and resistance levels, as well as trading volume information. Visual aids like automatically drawn support and resistance lines, coupled with insightful commentary on potential market movements, add context to trading decisions. This tool serves as both an analytical aid and an educational resource for novice traders.
#MQL5 #MT5 #Script #Algorithm

Read more...
❀23πŸ‘8✍2πŸ‘¨β€πŸ’»2πŸ‘Œ1
Enhancing the Trade Management Panel in MetaTrader 5 involves strategic layout adjustments and new button integrations to optimize trading operations. Historically limited by static designs, the new approach provides greater control by adjusting panel visibility alongside MetaTrader's chart features. Introducing helper functions aids in code clarity, effortlessly streamlining button creation. Adding critical operation buttons like 'Close All Orders' enhances quick, decisive trade management capabilities. Carefully developed handlers enable precise actionsβ€”such as executing trades or modifying ordersβ€”improving both efficiency and usability. These enhancements benefit programmers and traders alike, facilitating seamless, advanced algorithmic trading solutions.
#MQL5 #MT5 #TradeManagement #AlgoTrading

Read more...
πŸ‘24πŸ‘¨β€πŸ’»4❀3πŸ‘Œ2
The implementation of messaging between MQL5 programs requires careful understanding and management. In the context of MetaTrader 5, custom events allow programs to interact, but these interactions can lead to conflicts if not properly understood. Each program on a chart must handle the OnChartEvent procedure, which receives messages sent by the MetaTrader 5 platform.

Custom events are defined by CHARTEVENT_CUSTOM, allowing unique program interactions. EventChartCustom sends messages to the default handler OnChartEvent. However, improper use can lead to platform instability, as illustrated by custom event conflicts shown in independent vs. combined program scenarios.

Developers must understand chart isolation, message handling, and how MetaTrader 5 operates to avoid unintended interactions and platform issues. Proper testing and understanding of even...
#MQL5 #MT5 #Indicator #Strategy

Read more...
❀18✍16πŸ‘13πŸ‘Œ4⚑3πŸ‘¨β€πŸ’»3
A new technical library enhances the conversion of MT4 indicators and Expert Advisors to MT5, facilitating a smoother migration experience. The library offers extensive support for MetaTrader 4 functions, allowing developers to maintain a single codebase across platforms. This solution is customizable, enabling the addition of functions as needed.

Key integration instructions include incorporating the library functions with your existing MT4 code and using the provided .mqh file. The library assists with consistent cross-platform compatibility. Various MT4 functions such as retrieving Ask and Bid prices, tick size, and lot sizes are seamlessly translated into MT5 equivalents.

This library is advantageous for those aiming to streamline their development processes by conserving valuable time and resources.
#MQL4 #MT4 #EA #AlgoTrading

Read more...
πŸ‘24❀8πŸ‘Œ4πŸ‘¨β€πŸ’»3
A new compatibility-focused interface library has been developed to streamline the conversion process from MT4 to MT5. This library enables easier integration of MT4 indicators and Expert Advisors (EAs) into MT5 projects by providing comprehensive support for MetaTrader 4 functions. It facilitates a unified codebase approach, ensuring that developers can maintain a single codebase compatible with both platforms.

Key functionalities include extensive MT4 function support, customizable architecture for additional function inclusion, and flexible integration options. It can be implemented as an .mqh file or integrated directly into an existing EA or indicator. To utilize this solution, developers embed their MT4 code with the library functions, incorporate the .mqh file, and replace native MT4 functions with cross-compatible counterparts.

The library ai...
#MQL5 #MT5 #EALibrary #ForexDev

Read more...
πŸ‘16❀12πŸ‘¨β€πŸ’»5⚑3πŸ‘Œ2
The script MinMargins.mq5 is an efficient tool for calculating the minimal capital required to open positions with the lowest lot sizes for all symbols in the Market Watch. It generates a comprehensive CSV file, facilitating straightforward data review and analysis.

Key applications include precise capital planning, enabling traders to allocate funds efficiently by understanding the exact margin requirements across various symbols. The script also aids in symbol comparison, assisting traders in selecting symbols that match their risk tolerance and strategies. It supports risk management by clarifying the minimum financial exposure required for trading, helping prevent excessive leverage.

Furthermore, it automates the margin calculation process, saving considerable time and effort. This script proves invaluable for optimizing portfolios, allowing trade...
#MQL5 #MT5 #script #Strategy

Read more...
πŸ€”16πŸ‘9❀6✍5πŸ‘¨β€πŸ’»4πŸ‘Œ3😐2
Implementing enhanced tab management within a control involves new improvements and considerations. Tabs can be placed on any side of the control and utilize a new mode for tabs to stretch accordingly, ensuring rows adjust to control dimensions. The stretching logic varies with top/bottom tabs stretching in width, while side tabs stretch in height.

Updates to the class structure include introducing new properties to manage tab header positions effectively and ensuring they accommodate changes in size dynamically. Improved error handling aids in debugging graphical element constraints. Header placement is carefully managed to maintain aesthetic and functional integrity, especially when switching between different sizing modes.

These changes enhance the user experience in managing tab controls, optimizing responsiveness and layout versatility. Future ...
#MQL5 #MT5 #Algorithm #WinForms

Read more...
πŸ‘25❀17πŸ‘¨β€πŸ’»11πŸ‘Œ1
The iVIDYA (Variable Index Dynamic Average) indicator has been enhanced with two additional levels: upper and lower. These levels are set according to the size determined for N bars Rice. This approach allows traders to derive signals similarly to those from Bollinger Bands. The inclusion of these levels provides a dynamic range that adjusts with market volatility, potentially offering better insights into market trends. Users familiar with Bollinger Bands may find these additions beneficial for creating more robust trading strategies, as the VIDYA N Bars Borders Indicator ensures more adaptive and responsive market analysis. This precision in signal generation could assist in making more informed trading decisions.
#MQL5 #MT5 #Indicator #Strategy

Read more...
πŸ‘34❀11⚑5πŸ‘¨β€πŸ’»4πŸ‘Œ2
Unsupervised learning is key in handling datasets that lack labels. Unlike supervised methods, it autonomously identifies patterns. This approach includes tasks like clustering and dimension reduction. Clustering segments data into groups with shared attributes. K-means, a popular clustering algorithm, partitions data based on proximity to centroids.

The selection of initial centroids in K-means is crucial. The Elbow Method aids in determining the optimal number of clusters by evaluating Within Cluster Sum of Squares (WCSS). The choice of clusters significantly impacts accuracy, with fewer iterations generally achieving optimal results.

Integrating K-means with financial datasets requires careful preparation, shown in MQL5 environments.
#MQL5 #MT5 #Clustering #MachineLearning

Read more...
πŸ‘50❀23πŸ‘¨β€πŸ’»7πŸ‘Œ4⚑2😁1πŸ€”1
The script functions across all open positions for the selected trading symbol. It allows users to set a stop loss price that the script automatically adjusts for all positions. This is accomplished through a straightforward code structure, lacking built-in safeguards or validation checks. The tool provides a streamlined approach for simultaneously managing stop loss adjustments on multiple trades. Users should exercise caution and ensure thorough testing in a controlled environment before implementation. It's essential to incorporate comprehensive validation processes to prevent potential risks associated with the lack of protective measures.
#MQL5 #MT5 #Indicator #Script

Read more...
πŸ‘20❀17πŸ‘¨β€πŸ’»6πŸ‘€4πŸ‘Œ3
The methodology presented here enhances technical analysis by integrating advanced volume insights with machine learning. It leverages calculus-based volume derivatives and LSTM neural networks, offering a modern analytical framework that surpasses conventional approaches. The significance of volume as a market activity indicator is explored, focusing on how derivative calculations and neural network predictions can preempt price movements. This system emphasizes volume dynamics over price data, allowing for early trend detection and market reversals. Risk management is prioritized, incorporating strict loss limits and dynamic stops, making it adaptable to varying market conditions. Thorough backtesting and parameter tuning are essential prior to implementation.
#MQL5 #MT5 #AlgoTrading #VolumeAnalysis

Read more...
πŸ‘36❀33πŸ‘Œ10✍4πŸ‘¨β€πŸ’»3
The 'Ask' line on a candlestick chart is calculated by taking the 'Close' price and adding the corresponding value from the 'spread' array. This array is obtained during the OnCalculate function call. Understanding how the 'Ask' line is constructed is crucial for analyzing price movements and spread dynamics in financial markets. It provides insight into the cost associated with executing market orders at quoted prices. This calculation is vital for developing precise trading strategies and assessing potential trade impacts. Ensure to keep your spread data updated and accurately integrated for real-time analysis and decision-making.
#MQL5 #MT5 #Indicator #Trading

Read more...
πŸ‘30❀18✍6πŸ‘¨β€πŸ’»3πŸ‘Œ2πŸ‘€2
Dive into the intricacies of Proximal Policy Optimization (PPO) for reinforcement learning within algorithmic trading using MetaTrader 5. This sophisticated approach optimizes policies with small, calculated updates to stabilize learning processes, preventing drastic changes that may hinder performance. PPO excels with a clipping function ensuring gradual improvements, making it ideal for dynamic markets with high volatility. Implementing PPO in MQL5 involves integrating a data structure for managing PPO cycles and gradually refining trading strategies without overwhelming policy shifts. Experience stable, efficient learning suitable for both discrete and continuous action spaces, unlocking new potential for traders and developers.
#MQL5 #MT5 #ReinforcementLearning #PPO

Read more...
πŸ‘45❀34✍4πŸ‘Œ3πŸ‘¨β€πŸ’»2⚑1🀣1
The concept behind using two Stochastic Oscillator indicators, categorized as 'Fast' and 'Slow', involves displaying them within a single subwindow. In this configuration, the areas between their 'Main' lines are filled. The setup allows users to configure level settings directly through input parameters, which is particularly useful for integration into an Expert Advisor and for visualization during strategy testing. Notifications are included for line crossings, providing alerts through sound, email, and push notifications. This feature enhances real-time monitoring and decision-making efficiency by enabling a clear view of potential crossover signals.
#MQL5 #MT5 #Indicator #Strategy

Read more...
❀19πŸ‘15πŸ‘¨β€πŸ’»5πŸ‘€3✍2πŸ‘Œ2
Explore an innovative approach to streamline authentication in the MetaTrader 5 Admin Panel, focusing on the integration of a trusted user recognition system. This feature lets users bypass two-factor authentication (2FA) after logging in successfully within three attempts, significantly optimizing workflow during development while maintaining robust security. Protect sensitive data through password hashing, AES-256 encryption, and cryptographically secure random 2FA code generation, fortifying the system against brute force attacks. Experience the dual benefits of enhanced security and usability, providing a seamless user experience without compromising on data protection for traders and developers alike.
#MQL5 #MT5 #Crypto #Security

Read more...
πŸ‘27❀6πŸ‘Œ3πŸ‘¨β€πŸ’»3
Explore a comprehensive article series guiding MQL5 developers in crafting a robust log-handling library for MetaTrader 5. Designed to overcome native logging limitations, this series delves into building a customizable system for efficient log management, tailored to Expert Advisors. It covers fundamental concepts, best practices, and scalable architecture while detailing features like log level categorization, database storage, and dynamic metadata handling with JSON. Learn to implement Singleton patterns for consistency, employ log rotation to manage growth, and automate alerts for critical issues, enhancing both debugging and performance monitoring capabilities for algorithmic trading professionals.
#MQL5 #MT5 #EAs #Logs

Read more...
πŸ‘19❀16✍3πŸ‘Œ3πŸ‘¨β€πŸ’»3
The article delves into the challenges faced by traditional models in capturing long-term dependencies in time series data, often due to their limited ability to explore relationships between distant data segments. It introduces the Segment, Shuffle, and Stitch (S3) mechanism, designed to optimize time series representation by strategically rearranging data for improved learning. S3 segments the series, optimizes segment order through learnable weights, and combines data using a weighted sum. This modular mechanism seamlessly integrates with existing models, enhancing training procedures and performance significantly. The method is computationally efficient, with minimal hyperparameters, and can drastically improve forecasting and classification model accuracy when integrated into neural architectures.
#MQL5 #MT5 #TimeSeries #AI

Read more...
πŸ‘40❀22πŸ‘Œ5πŸ”₯2πŸ€“2πŸ‘¨β€πŸ’»2