MQL5 Algo Trading
392K subscribers
2.58K photos
2.59K 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 integration of Python-like time modules in MQL5 to enhance algorithmic trading capabilities. Addressing the limitations of native MQL5, this implementation introduces Python-inspired classes such as CTime, CDate, and CDatetime for efficient time manipulation, timezone handling, and accurate timestamp conversions. These additions facilitate sophisticated backtesting and time-sensitive systems in MetaTrader 5. The complete implementation is available for community collaboration on GitHub. Each module provides essential methods similar to Python's datetime, improving accessibility and precision in trading applications. Access the repository to explore these innovative tools for trading and development.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #python
❀16πŸ‘6⚑2πŸ‘¨β€πŸ’»2πŸ‘Œ1
Multi-timeframe analysis is essential for understanding market direction in trading. A lower timeframe signal can conflict with higher timeframe trends, leading to unreliable results. The Timeframe Visual Analyzer enhances this by overlaying two higher-timeframe candles on the current chart, maintaining market focus. This allows traders to confirm directional bias across timeframes and receive alerts when alignments are detected, offering settings for sound, push notifications, and emails. The tool ensures seamless chart integration with customizable visual styling and performance optimization, supporting traders' workflows without chart switching, aiding quick decision-making in dynamic market conditions.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀29πŸ‘¨β€πŸ’»4⚑3πŸ”₯2
The Hidformer framework leverages a unique dual-tower encoder structure to effectively analyze and forecast complex multivariate time series, particularly beneficial for handling dynamic and volatile data. This framework excels in drawing out both explicit and hidden dependencies in the data through advanced attention mechanisms, enhancing the analysis of both temporal structures and frequency domains.

A significant feature of Hidformer is its recursive attention mechanism, which aids in capturing intricate temporal dependencies in financial data. The linear attention mechanism complements this by optimizing computations while maintaining training stability. Together, these components enable reliable forecasts, vital in high-volatility markets.

The model's multilayer perceptron-based decoder offers efficient sequence prediction, improving long-t...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #TimeSeries
❀34⚑3πŸ‘¨β€πŸ’»1
An Expert Advisor is available that systematically executes orders based on grid settings. It can place additional orders either with a constant or increasing lot size, depending on user-defined settings. The grid placement can also be tailored using RSI and CCI indicators, adding an element of signal-based decision-making to the strategy.

Positions can be closed upon reaching a specified profit level, or when a profit combined with an MA reversal is detected. The tool allows for the independent closure of Buy or Sell orders, or all open positions simultaneously. It also has the capability to autonomously trade based on signal detection.

Feedback regarding code errors or optimization suggestions is welcome for further refinement and enhancement of functionality.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #EA
❀24πŸŽ‰3πŸ‘¨β€πŸ’»3
Explore advanced strategies in MetaTrader 5 with a focus on bidirectional communication using sockets. Transition from simple data transfers to controlling MetaTrader with external data inputs. Unlike RTD or DDE, sockets offer reliable, sequence-guaranteed data flows with TCP or rapid message dispatch with UDP, depending on your needs. Develop robust applications by building a Client-Server model that integrates real-time data exchange. Practical socket application enhances chart signals and trading decisions without native server support in MQL5. Elevate your algorithmic trading capabilities by mastering these communication methods and expand your market analysis toolkit.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Socket
❀27πŸ‘2πŸ‘¨β€πŸ’»2πŸ†1
The introduction of an optimization project creation script has shifted project development towards efficiency. Rather than manually setting tasks, a template-driven script offers a streamlined method for creating optimization projects tailored to diverse trading strategies. The main achievement is an operational solution allowing new strategy groups to be exported directly to a separate EA database, distinguishing it from the previous optimization database.

The transition to a new project file structure has further simplified processes. By consolidating common code into a library separate from project-specific files, maintenance and scalability are enhanced. Each project retains its unique files while relying on a shared library for common functionality.

Auto update functionality in the final EA is a key enhancement. It enables dynamic loading of updated ...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀23πŸŽ‰4πŸ‘¨β€πŸ’»2
Unlock the potential of MetaTrader 5 beyond traditional forex trading by exploring diverse assets like ETFs, equities, and commodities. The article reveals how traders can identify the best indicators for algorithmic trading by using data-driven approaches. Experiment with high-momentum ETFs, such as VGT, using MetaTrader 5 to assess and identify effective indicator pairings. Utilize statistical methods like Kendall’s Tau and Distance Correlation to evaluate the independence of indicators and avoid redundancy. This approach enables developers to craft more robust trading strategies, maximizing efficiency while minimizing resource waste. Explore innovative trading insights and refine your edge with precise technical methodologies.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Algorithm
❀29πŸ‘¨β€πŸ’»2
Accelerate your financial ML pipeline by tackling computational bottlenecks with intelligent caching solutions for MetaTrader 5. By persisting intermediate results and introducing custom key generation, AFML reduces strategy optimization time from hours to minutes. Dive into advanced caching patterns to enhance cross-validation efficiency and prevent test set contamination. Effortlessly integrate with existing projects via decorator patterns without complicated configurations. Transition smoothly from research to production with rapid feature engineering, robust cross-validation, and efficient backtesting while maintaining data integrity. Unlock reduced computation latency to iterate and deploy sophisticated ML strategies in live trading environments effectively.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #ML
❀25✍6πŸ‘5πŸ‘¨β€πŸ’»4
In Part 42, a customizable Session-Based Opening Range Breakout (ORB) system is developed in MQL5. The system captures true high and low during defined session times and identifies breakouts with multi-bar confirmation to minimize false signals. Trades are executed in the breakout direction with configurable stop-loss and take-profit options. The system incorporates dynamic or static risk-reward management and can utilize trailing stops upon reaching a profit threshold. Visualizations include range markers and entry signals for clarity. Implementation involves defining session times, range calculation, breakout identification, and position management, ensuring adaptability for various market sessions.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Strategy
❀51πŸ‘¨β€πŸ’»5
In the previous discussion, the focus was on templates and their efficiency in solution implementation. Moving from templates, we now turn our attention to structures within MQL5 programming. Structures serve as a critical building block, surpassing basic variables and approaching a more organized form of code.

Understanding the distinction between a structure and a union is crucial. A union shares memory among its elements, whereas a structure assigns unique memory spaces. This makes structures essential for complex variable management, allowing multiple elements within a single unit.

A common misconception among beginners is neglecting the design purpose of structures. They are more than convenience; they fulfill specific roles that necessitate understanding of their utility. Certain features seen in languages like C++ are missing in MQL5, often due ...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #MQL5
❀23πŸ‘Œ3πŸ‘2πŸ”₯2πŸ‘¨β€πŸ’»2
Explore the transformative journey of developing custom trading signals for MetaTrader 5 using the MQL5 Wizard. This tool enables rapid prototyping of Expert Advisors, even for those with limited coding skills. By embracing its modular design, robust risk management, and pre-optimized components, developers can efficiently create and integrate personalized candlestick pattern signals into trading strategies. Key challenges such as class visibility within the Wizard are tackled by ensuring proper metadata configuration and adherence to structural standards. Discover how this innovative approach not only simplifies algorithmic trading development but also enhances precision and adaptability in creating effective trading systems.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀23πŸ‘¨β€πŸ’»9πŸ‘3πŸ”₯2🀯2πŸ‘Œ2
In our continued examination of MQL5, an advanced script is set for implementation. Focusing on candlestick data retrieval from platforms via MQL5's API, we aim to obtain detailed data beyond just current prices. This includes time, open, high, low, and close prices across multiple candles. Upon retrieval, each data type will be stored in separate arrays to enhance data management capabilities.

Utilizing WebRequest, our project initiates data extraction by querying comprehensive candlestick information. This involves configuring the method to GET, building the correct URL structure, and parsing returned JSON data into separate arrays. This facilitates precise data analysis.

Key to success is understanding the structure of returned data, storing them systematically, and ensuring your WebRequest setup accurately reflects server requirements. Methodical p...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #MQL5
❀55πŸ‘Œ4🀑4πŸ”₯3πŸ‘¨β€πŸ’»3πŸ€”2πŸŽ‰1
The Price Action Analysis Toolkit has developed a tool that enhances chart analysis by scanning and identifying candlestick patterns. Initially intended to locate patterns, its application has expanded to reveal recurring price levels, acting as support or resistance. Recognizing these levels allows traders to anticipate market behavior, better timing for entries and exits, and strategic stop placements.

The Pattern Density Heatmap further advances this by detecting historical candlestick patterns to create zones that illustrate past market reactions. This approach offers a strategic advantage by informing traders of potential market moves as price approaches these zones.

Implementation in MQL5 involves coding a system that scans historical data for patterns, aggregates detections into price zones, and visualizes them with a heatmap. These zones are no...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Pattern
❀57πŸ‘¨β€πŸ’»6πŸ‘Œ3
Average Daily Range (ADR) and Average True Range (ATR) are essential indicators used in trading for volatility analysis. ADR measures the average difference between the maximum and minimum prices over a specific period, such as 14 days. This provides traders with insights into expected price fluctuations within a day, aiding in strategy development.

In contrast, ATR calculates the average of the true range values. The true range considers the differences between today's high and low, today's high and the previous close, and today's low and the previous close. By accounting for these gaps, ATR offers a more comprehensive view of volatility and is valued for adaptability to market changes.

While ADR focuses on daily volatility, ATR’s flexibility makes it suitable for broader applications, including risk management and establishing stop-loss levels. Understanding ...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #ADR
❀31πŸ‘Œ6✍2πŸ‘¨β€πŸ’»1
Explore an advanced approach to creating Expert Advisors (EAs) in MetaTrader 5 using a systematic constructor methodology. This framework facilitates a modular design with customizable trading strategies through a simple 'copy-paste' logic, ensuring the inclusion of essential functions like Stop Loss, Take Profit, and Trailing Stops. By leveraging the structured `SearchTradingSignals` and `STRUCT_POSITION` methods, the article outlines robust techniques for managing trades, including executing and confirming trading orders. Additionally, it delves into integrating standard and custom indicators, showcasing effective algorithmic solutions for developers and traders interested in reliable, versatile EA development.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #EA
❀48πŸ‘¨β€πŸ’»9✍8
The multi-timeframe confluence oscillator integrates Stochastic, RSI, and MACD across three timeframes to support trend entry identification. It assigns scores for alignment, with values above 50 indicating bullish sentiment and below -50 suggesting bearish sentiment. This tool is designed for trend-continuation confirmations, reactions to support and resistance levels, and identifying exhaustion conditions. Unlike traditional methods that normalize values, this oscillator relies on a scoring system to provide its insights. It has shown effectiveness, especially in detecting divergences, making it a useful component of a technical analysis toolkit when used alongside other strategies.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀33πŸ‘¨β€πŸ’»2⚑1
The two moving averages crossover strategy remains a staple in trading. It leverages two moving averages, typically with different timeframes like 50-day and 200-day. Traders monitor the point of intersection. A short-term moving average crossing above a long-term one indicates a potential buy situation, suggesting a trend reversal upwards. Conversely, a downward crossover may signal a sell opportunity.

Selecting appropriate periods is crucial for accurate signals. Incorporating risk management through stop loss orders enhances strategy robustness. Setting stop losses at strategic levels can mitigate potential downturn impacts. Ensure continuous testing and evaluation to refine strategy effectiveness in varying market conditions. Stay informed and adapt to market changes.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Strategy
❀23πŸ‘Œ3πŸ‘¨β€πŸ’»1
Explore how dynamic, multidimensional arrays enhance MetaTrader 5 development. The article introduces an innovative approach for managing complex object properties using dynamic arrays, allowing flexibility beyond traditional static arrays. Developers can now store various data typesβ€”integer, real, or stringβ€”using a custom class that dynamically adjusts to changing data dimensions. This progression facilitates streamlined storage of multi-property objects like graphical elements on a trading chart, solving the challenges of static array limitations. The approach ensures scalability and adaptability in storing dynamically changing object data, vastly improving algorithmic trading strategies with intricate, updatable data structures.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Algorithm
❀42πŸ‘¨β€πŸ’»8