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
The Profitunity System, developed by Bill Williams, leverages a set of specialized indicators for trading in chaotic market conditions. Key indicators such as Fractals, Alligator, Awesome Oscillator (AO), and Accelerator Oscillator (AC) are utilized. Each indicator contributes unique insights: Fractals identify potential trend reversals, Alligator assesses market trends, AO measures momentum, and AC detects trend accelerations.

Implementing this system in MetaQuotes Language 5 (MQL5) involves coding these indicators and automating entry and exit signals. Once coded, testing and optimizing ensure robust performance across different market conditions. Appropriate exit strategies, such as tracking Alligator and oscillator reversals, are crucial. Automating this strategy provides scalable trading solutions adaptable to dynamic market environments.
#MQL5 #MT5 #Strategy #AlgoTrading

Read more...
πŸ‘21❀12πŸ†4πŸ‘Œ3πŸ‘¨β€πŸ’»2
In the previous installment, an in-depth examination of the ATFNet algorithm was conducted, showcasing its combination of time and frequency domain forecasting models. The ATFNet architecture employs the Transformer’s multi-layer Encoder with multi-headed Self-Attention, particularly in its frequency F-Block, utilizing complex number mathematics. This piece delves into the implementation of the ATFNet class by crafting the CNeuronATFNetOCL class, which encapsulates the entire algorithm. This approach, though not optimal within a single class structure, aligns with previous sequential models that lack support for multi-process operations inherent to T-Block and F-Block.

The internal structure, declared statically, simplifies by separating objects into time and frequency blocks, ensuring clarity and organizational efficiency. It begins with internal o...
#MQL5 #MT5 #Algorithm #TimeSeries

Read more...
πŸ‘25❀19πŸ‘Œ13✍2⚑2πŸ†2😁1
Online learning is a crucial machine learning method for real-time applications, particularly where data streams are rapidly evolving. It allows models to adaptively learn from incoming data, essential for sectors such as trading, where timely and precise predictions are necessary. Implementing online learning in platforms like MetaTrader 5 requires a distinct approach, integrating Python with MQL5 to handle model training and deployment efficiently.

By automating processes using libraries like CatBoost and GRU, models can be updated continuously in response to new data. This setup ensures that models remain relevant, leveraging an infrastructure tailored for dynamic environments. However, moderation is key, as frequently updating models can introduce sensitivity to data sequences, necessitating periodic human review.

Models built incrementally can be...
#MQL5 #MT5 #OnlineLearning #ML

Read more...
πŸ‘22❀16πŸ‘¨β€πŸ’»2πŸ‘Œ1πŸ‘€1
Mutual information is a potent tool for feature selection, offering unique insights into dependencies in complex, nonlinear datasets. The technique excels by identifying predictors that traditional methods might overlook. This article introduces the application of mutual information in identifying effective predictors, emphasizing the algorithm proposed by Peng, Long, and Ding. The focus is on the accurate estimation of mutual information for continuous variables through adaptive partitioning and the Parzen window method, demonstrating how these techniques overcome the pitfalls of fixed binning. With practical code examples in MQL5, traders and developers can implement these methods for enhanced model performance, balancing relevance with redundancy in predictor selection.
#MQL5 #MT5 #Algorithm #FeatureSelection

Read more...
❀10πŸŽ‰6πŸ‘5πŸ‘Œ3πŸ‘¨β€πŸ’»1
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