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 how deep learning is revolutionizing trend forecasting in financial markets by using Molformer, a novel algorithm inspired by chemical element analysis. It utilizes motifsβ€”recurring substructures within molecular graphsβ€”to enhance data representation, akin to natural language processing techniques. Molformer introduces key innovations, such as heterogeneous self-attention (HSA) and attentive farthest point sampling (AFPS), to precisely capture interactions within complex data. For MetaTrader 5 developers, this can mean more accurate trend predictions and improved algorithmic trading strategies. Discover how these cutting-edge techniques can be implemented in MQL5 to harness their full potential for financial market analysis.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #DeepLearning
❀25πŸ‘6πŸ‘¨β€πŸ’»2πŸŽ‰1
In Part 18, the focus shifts to automating the Envelopes Trend Bounce Scalping Strategy utilizing MQL5. This stage establishes the development of an Expert Advisor's core infrastructure, including signal generation logic essential for scalping small profits from identified price reversals.

Key aspects involve implementing the strategy with the Envelopes indicator, which determines buy and sell signals through interaction with defined bands and confirmations from trend filters such as the EMA and RSI.

Critical steps include setting global variables, initial input configurations, libraries for trading operations, and constructing modular functions to ensure precise trade signaling. Structured risk management techniques will minimize exposure to false signals within ranging markets.

The development and integration of classes and utility functions to manage p...

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Scalping
❀35πŸ‘13πŸ‘¨β€πŸ’»3
Explore the power of the ALGLIB library within the MetaTrader 5 terminal for robust trading system development. ALGLIB offers advanced numerical analysis methods, crucial for optimizing trading algorithms. Key techniques include BLEIC for constrained optimization and L-BFGS for handling large-scale variable problems efficiently. BLEIC addresses optimization challenges by respecting boundaries and constraints, ideal for trading systems with specific restrictions. Conversely, L-BFGS efficiently approximates Hessian matrices for rapid problem-solving in scenarios with numerous variables. MetaTrader 5 developers can leverage these methods to enhance trading strategies, while finding optimal solutions becomes intuitive with clear steps in algorithm setup and execution.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Algorithm
❀27πŸ‘¨β€πŸ’»4⚑1
Technical analysis of arrays in functions and procedures requires understanding MQL5's particularities. Arrays in MQL5 are simplified compared to languages like C/C++. Notably, passing arrays as function arguments in MQL5 always occurs by reference, eliminating certain complexities found in other languages.

MQL5 developers benefit from stricter array handling, leading to safer code. The flexibility to modify arrays within functions demands careful attention, especially when dealing with dynamic structures. Dynamic arrays add complexity due to memory management and initialization nuances.

Remote initialization and manipulation of the array are feasible, allowing advanced data structures to be designed within MQL5's framework. Coders must grasp referenced-based data flow to employ these techniques effectively in practical applications.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Array
❀41πŸ‘10⚑3πŸ‘¨β€πŸ’»3
A comprehensive repository of Python scripts and classes is structured within the Trade classes Python.zip folder. Designed for trading systems, it includes multiple modules tailored for specific tasks. Each module encapsulates a different aspect of trading operations in Python.

Modules:

- `AccountInfo.py`: Implements `CAccountInfo` for account-related queries.
- `DealInfo.py`: Houses the `CDealInfo` class for managing trade deals.
- `HistoryOrderInfo.py`: Contains `CHistoryOrderInfo` for historical order data.
- `OrderInfo.py`: Defines `COrderInfo` for active order data management.
- `PositionInfo.py`: Features `CPositionInfo` for tracking open trading positions.
- `SymbolInfo.py`: Includes `CSymbolInfo` for obtaining symbol-specific data.
- `TerminalInfo.py`: Details `CTerminalInfo` for terminal state information.
- `Trade.py`: Contains `CTrade` to...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Python
❀33πŸ‘6πŸ‘¨β€πŸ’»3⚑1
A comprehensive overview of various optimization algorithms implemented for advanced computational tasks demonstrates significant progress across algorithmic research. Among them, ANS (across neighbourhood search) and CLA (code lock algorithm) provide robust frameworks for complex searches. P_O_ES ((P+O) evolution strategies), CTA (Comet Tail Algorithm), and SDSm (stochastic diffusion search M) emphasize evolution and adaptation in dynamic environments.

Algorithms like ESG (evolution of social groups) and SIA (simulated isotropic annealing) highlight social dynamics and thermodynamic principles. ACS (artificial cooperative search) and TSEA (turtle shell evolution algorithm) explore cooperative and protective strategies. DE (differential evolution) and CRO (chemical reaction optimisation) cater to specialized search and reaction-based processes.

E...

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Algorithm
❀18πŸ‘9πŸ‘€4πŸ‘¨β€πŸ’»1
Explore an advanced MetaTrader 5 Expert Advisor blending the Fractals indicator with Exponential Moving Averages (EMA) to enhance price action analysis. This system integrates fractal patterns with EMA 14 and 200 to identify potential market reversals aligned with trend directions. By marking critical fractal support/resistance levels and confirming breakouts with EMA trends, traders gain clearer, more reliable entry points. The modular code allows for customization, while visual cues such as arrows and labels streamline decision-making. The EA's effectiveness in both backtesting and live environments demonstrates its ability to provide early reversal signals and improve trading precision.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #EA
❀37πŸ‘7πŸ”₯5πŸ‘¨β€πŸ’»4
Machine learning often focuses on individual candlesticks, sidelining patterns that reveal significant market trends. These patterns, formed under similar conditions, provide insight into market behavior. The Atom-Motif Contrastive Transformer (AMCT) framework was developed to enhance molecular prediction by utilizing atom and motif representations. Through contrastive learning, AMCT aligns atom and motif views of the same entity, improving molecular representation quality.

Implementation in programming environments like MQL5 involves creating parallel pathways for atoms and motifs, using tools like OpenCL to efficiently handle data gradients. Emphasizing consistency across molecules, motif contrastive loss bolsters the robustness of predictions. Integrating relative encoding enhances framework architecture, ensuring cohesive model training.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #MachineLearning
❀62πŸ‘9πŸ‘¨β€πŸ’»6✍5😁5πŸ‘€2πŸ†1
This Expert Advisor (EA) is engineered to automate triangular arbitrage among EURUSD, USDJPY, and EURJPY currency pairs. It systematically identifies arbitrage opportunities by calculating the implied EURJPY price via the Ask prices of EURUSD and USDJPY, comparing it with the direct EURJPY price. When a predefined relative difference threshold is surpassed, an opportunity arises.

The EA executes trades based on this analysis: purchasing EURJPY and offloading EURUSD and USDJPY if the implied price exceeds the direct price, or conducting the inverse trades if otherwise. It employs a specific Magic Number for effective tracking of positions, isolating its transactions from others. Positions are closed when cumulative profits surpass the set target. Robust error handling mechanisms ensure seamless operations, automatically addressing issues during trade execution. ...

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #EA
❀42✍7πŸ‘6πŸ”₯2πŸ‘Œ2⚑1πŸ‘¨β€πŸ’»1
Developing a multi-timeframe scanner dashboard in MQL5 enhances strategic trading through real-time trading signals. This tool features a grid layout with buy/sell indicators across timeframes like RSI, STOCH, CCI, ADX, and AO, helping traders spot trends without switching charts. Key to implementation is object management, with specific constants for dashboard design, enabling organized UI structuring. Functions like "calculate_signal_strength" assess market conditions for actionable insights. Dynamic updates ensure responsive interaction, while a close button facilitates user-friendly control. This setup supports adaptability for further enhancements, such as automated alerts, thus empowering traders with a streamlined monitoring process.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #dashboard
❀33✍5πŸ‘5πŸ‘Œ4πŸ†2πŸ‘¨β€πŸ’»2
The development of an Expert Advisor (EA) in MQL5 revolves around precise identification of trend lines which facilitate automated trade decisions. This programmatic approach requires a deep dive into MQL5 functions, emphasizing efficient data retrieval and analysis of chart patterns. Key components include accessing exact price values through ObjectGetValueByTime(), which enables the EA to align trade execution precisely with trend movements.

Trend lines, differentiated as ascending or descending, serve as the core markers of market direction. Ascending lines indicate support in an uptrend, presenting buying opportunities when price action aligns. Conversely, descending lines act as resistance in downtrends, signaling potential sell points. An EA exploiting these dynamics observes candlestick behaviors such as wicks and closes to confirm pattern breaks or re...

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #EA
❀37πŸ‘4πŸ‘€4πŸ”₯3πŸ‘¨β€πŸ’»2⚑1
Time series forecasting is critical in predicting future values from historical data. It involves key variables: time (independent) and target variable (dependent). This ensures informed predictions by leveraging past trends. Univariate and multivariate approaches exist.

ARIMA (AutoRegressive Integrated Moving Average) is specialized for time series analysis, using past values and prediction errors to forecast future values. Composed of AR (p - past value influence), I (d - differencing to achieve stationarity), and MA (q - lagged errors). Determining optimal p, d, q values involves PACF and ACF plots.

In Python, ARIMA can model financial data like EURUSD. The SARIMA extends ARIMA, incorporating seasonality, for data with regular patterns. Both models assume stationarity and are linear, offering accurate forecasting within their domains. Understanding ...

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #ARIMA
❀35πŸ‘4πŸ‘¨β€πŸ’»4πŸ‘€4✍2πŸ‘Œ2🀨1
Modifying the mouse indicator to receive order book events is essential when using replay systems in simulation applications. Understanding previous modifications is key for following current content. Integration of order book events allows improved usage of the OnCalculate function through iSpread data retrieval in MetaTrader 5.

In transitioning code from a test service to a replay/simulation service, attention must be given to proper loading sequences for modules. It is important to handle control indicators before the mouse indicator for effective execution. With order book messages, initializing appropriate variables and constants in the class constructor can ensure auction states display correctly, enhancing the visual accuracy of mouse indicators.

Handling time gaps requires careful event management to prevent flickering effects and ensure seamle...

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Replay
❀66✍10πŸ‘10πŸ†4πŸ”₯3πŸ‘Œ2πŸ‘¨β€πŸ’»2
An essential indicator has been developed to meet the requirements of Expert Advisors (EAs) seeking to monitor fluctuations in volume. This tool offers a straightforward method of calculating the average volume over a specified time period using candles. It accommodates both Tick Volume and real volume. To determine if the volume has increased, EAs need only compare whether the volume from a longer period is less than that from a shorter period. The indicator integrates seamlessly with MQL5 and FX Dreema EAs. In scenarios where only Tick Volume is available, the indicator displays a pink line representing average tick volume. Should real volume data be provided, it is illustrated as a blue line, providing a comprehensive volume analysis.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Indicator
❀35πŸ‘7⚑1✍1πŸ‘Œ1πŸ‘¨β€πŸ’»1
The recent update addresses fundamental issues in Windows Forms-style control development. Initial graphical object handling encountered problems when switching chart timeframes, leading to graphical objects not being displayed. This was accompanied by journal messages indicating object creation failures. While only form objects were interactive with the mouse, the core graphical element did not include mouse-handling capabilities. This necessitated changes to ensure form objects could serve as minimum graphical objects for interaction.

Additionally, enhancements were made to the library classes. The introduction of the new GraphINI.mqh file enables rapid styling of graphical elements by defining color schemes and various display styles. This reorganization aims to improve parameter readability. To prevent memory leaks during object inheritance, c...

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #AlgoTrading
❀41✍5πŸ‘4πŸ†3πŸŽ‰2πŸ‘¨β€πŸ’»2🀯1
In the MetaTrader 5 Build 5100, we've significantly enhanced the MetaEditor source code editor. The built-in version control system MQL5 Storage has transitioned from Subversion to Git – the global standard for developers – offering enhanced reliability and flexibility in code management.

With this transition, we're introducing MQL5 Algo Forge, a new online portal for project management. This is not just a project list, it is a full-fledged social network for developers. Follow interesting developers, create collaborative teams, and manage projects effortlessly.

Additionally, we've implemented dark mode support for all platform components, offering a more comfortable user experience during nighttime hours.

For hosting, we now offer a 12-month VPS rental option. By purchasing long-term hosting upfront, you save one-third of the total cost.

Finally, we've significantly expanded support for OpenBLAS linear algebra libraries in MQL5, adding nearly thirty new functions.

Read more...
❀272πŸ‘33πŸ‘€16πŸ‘¨β€πŸ’»12⚑9πŸ‘Œ9πŸ”₯6
A custom indicator developed for MetaTrader 5 is designed to display a BMP image centrally on the trading chart. It allows traders to incorporate static visual elements like logos, branding, or messages without interfering with chart analysis or market data. This indicator functions by creating an OBJ_BITMAP_LABEL object to exhibit an image (2.bmp) located in the MQL5Images folder. It calculates the center of the chart automatically and positions the image accordingly. Furthermore, it adjusts the image position with every new tick, ensuring it remains centered even when the chart window is resized. This utility enhances visual customization for traders while maintaining analysis integrity.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Indicator
❀38✍7πŸ‘6πŸ‘¨β€πŸ’»1
In the recent analysis, only 3 out of 10 signal-pattern combinations, using TRIX and Williams Percent Range (WPR), succeeded in forward-walk testing on the CHF JPY 4-hour timeframe. Training was conducted for 2023, with forward walking over 2024. Python was used to implement these patterns, leveraging its efficiency in coding and training networks, even without a GPU.

The TRIX function in Python calculates the rate of change of a triple-smoothed EMA, helping identify trend direction and reversals. The WPR function serves as a support/resistance oscillator to determine overbought/oversold conditions. Both functions emphasize the importance of proper input management and error handling.

The Conv1D network utilizes cosine kernels for adaptive channel progression and robust feature extraction. This method is advantageous for handling sequential data patterns, par...

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Conv1D
❀43✍5πŸ‘4πŸ‘¨β€πŸ’»1
Trade execution and risk management are crucial in automating MetaQuotes Language 5 (MQL5) strategies. In Part 19 of developing the Envelopes Trend Bounce Scalping Strategy, focus shifts to implementing these components to build a fully operational system. Initially, define a consistent signal evaluation framework by establishing interfaces like "IAdvisorStrategyExpression" and respective classes for signal management.

Next, develop "TradeSignalCollection" and "AdvisorStrategy" classes to handle signal registration and evaluation, which lays an essential foundation for efficient trade execution. Implement buy and sell signal logic using derived classes from "ASSignal," incorporating indicators and market conditions to trigger appropriate signals.

Money management is structured with the "IMoneyManager" interface, ensuring optimal trade sizing and lot c...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Strategy
❀37πŸ‘8πŸ‘2πŸ‘¨β€πŸ’»2⚑1😁1πŸ‘€1
The article focuses on enhancing candlestick pattern recognition with RSI divergence for improved trading signals. Two key patternsβ€”pin bar and engulfingβ€”are combined with RSI divergence for robust analysis. This method addresses the shortcomings of relying solely on pattern recognition by integrating momentum indicators.

The strategy includes an in-depth examination of pin bars and engulfing patterns, followed by an RSI divergence confirmation. The process involves backtesting using historical data to validate the strategy's effectiveness. Results suggest high reliability, particularly when multiple criteria confirm signals.

The tool's modular design allows for real-time data analysis, visual signals, and timely alerts, making it suitable for traders seeking systematic approaches.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Strategy
❀40πŸ‘8πŸ‘¨β€πŸ’»3