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 new article in the series on MetaTrader 5 development guides you through transforming a static on-chart control panel into an interactive tool for algorithmic trading. By implementing the OnChartEvent function, the panel now responds to user actions like calculating lot sizes and executing trades directly from the chart. Advanced techniques, such as incorporating real-time market prices and dynamic dropdowns for order types, enhance the trading interface, making it highly responsive and user-friendly. Practical helper functions facilitate streamlined trade execution, while maintaining clean code structure that is both robust and easy to maintain. This guidance provides traders and developers with a powerful, efficient trading tool.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀19πŸ‘¨β€πŸ’»5πŸ‘Œ3
In Part 10 of our series on MQL5 for Expert Advisors, we introduce a strategy tracker system that enhances real-time performance monitoring. This system is capable of detecting moving average crossover signals filtered by a long-term moving average, and visualizes trade actions on the chart. It provides a comprehensive dashboard with performance metrics, including total signals, wins/losses, profit points, and success rates.

Implementation involves creating enumerations, input parameters, global variables, and helper functions for visualization. We leverage the MQL5 environment to handle moving averages, signal detection, and position tracking. Key features include modular dashboard creation, signal visualization, and both virtual and real trade simulations. This tool supports strategy evaluation, allowing for dynamic adjustments based on detailed f...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Strategy
❀38πŸ‘9πŸ‘Œ2πŸ‘¨β€πŸ’»2
Quantum computing offers new possibilities for financial market analysis by moving beyond classical technical indicators to assess all potential market scenarios simultaneously. Utilizing a combination of MetaTrader 5 and IBM's Qiskit library, traders can analyze historical data as quantum states. Quantum Phase Estimation (QPE) becomes invaluable, enabling the encoding of price time series as unitary operators. This allows the extraction of hidden patterns and potential future states through the eigenvalues of these operators. By converting price data into a binary sequence and utilizing discrete logarithm quantum algorithms, hidden market patterns can be identified with improved efficacy. Integrating such quantum-based methods with traditional platforms like MetaTrader 5 enables pre-emptive identification of trend reversals and market patterns, provi...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Quantum
❀60πŸ†6✍4πŸ‘¨β€πŸ’»4πŸ‘3πŸ‘Œ3
A new technical indicator is now available for use, featuring colored histograms that distinguish between bullish and bearish bars. This tool is designed to enhance visual analysis by displaying two distinct colors, one for bullish bars and another for bearish bars or candles. The clear color differentiation aids in quickly assessing market trends and price movements. Users will find this visual aid useful for real-time analysis in various trading strategies, improving their ability to identify potential market shifts effectively. This indicator enhances chart readability and supports more informed decision-making in trading.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL4 #MT4 #Indicator
❀20✍6πŸ‘Œ2🀯1πŸ‘¨β€πŸ’»1
Discover the advanced MacroHFT framework for high-frequency crypto trading, combining state-of-the-art reinforcement learning with memory utilization to adapt to dynamic markets while managing risk. This framework involves a two-stage training process, classifying market states by trend and volatility for optimized sub-agent training, and a memory-enhanced hyper-agent for coordination. Key components include a data preprocessing module for noise reduction, deep learning sub-agents for market adaptation, and a memory-augmented hyper-agent for high precision predictions. Introducing a risk management module optimizes trade sizing based on forecast confidence, enhancing resilience in volatile markets and improving capital efficiency. This innovative approach elevates trading strategy effectiveness and profitability for developers and traders alike.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #HFT
❀28πŸ‘1πŸ”₯1πŸ‘Œ1πŸ‘¨β€πŸ’»1
In the latest iteration of the ChatGPT-integrated MetaTrader 5 system, we've introduced a collapsible sidebar, significantly improving user interface flexibility for algorithmic traders. The sidebar dynamically toggles between expanded and contracted states, optimizing screen space for chart analysis while maintaining access to chat and AI insights. Small and large history pop-ups allow for efficient navigation through historical data, streamlining decision-making processes. This feature is seamlessly integrated, with detailed implementation in MQL5, utilizing elements like toggle buttons and scroll functions for enhanced usability. The result is a robust trading assistant tool, adaptable for both detailed analysis and quick market insights, suited to diverse trading strategies.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #AI
❀31πŸ‘Œ3🀑2πŸ‘1πŸ‘¨β€πŸ’»1
Explore the power of time-filtered trading within the MQL5 framework, where precision meets discipline. Using modular components such as the TimeFilter layer and SessionVisualizer, we can define specific trading windows, ensuring trades execute only during optimal market conditions. This approach minimizes noise and leverages session-based volatility, providing clarity and adaptability in trading strategies. By combining clock, session, and event-driven controls, traders and developers can create sophisticated automated systems that respond not just to price signals, but aligned with the market's temporal rhythm, enhancing decision accuracy and strategic performance in algorithmic trading environments.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Strategy
❀25πŸŽ‰4πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore the innovative Blood Inheritance Optimization (BIO) algorithm, inspired by genetic inheritance principles akin to blood types. This algorithm combines unique mutation strategies, derived from four blood groups, to optimize solution search processes. Each group's distinct approachβ€”ranging from conservative mutations to radical parameter changesβ€”enhances exploration and solution discovery. The algorithm's robust framework supports adaptable population management through a blend of inheritance and evolution techniques. Test results demonstrate BIO's efficiency across varied functions, positioning it as a promising addition to population-based optimization methods, offering significant value to developers and traders in algorithmic trading environments.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #algorithm
❀30✍6πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸ€”2
A new indicator employs a volatility filter utilizing three distinct ATR calculations: fast, middle, and slow. The objective is not to forecast price direction but to identify areas where volatility is elevated, indicated by wave crests. This tool can assist traders in pinpointing moments of heightened market activity suitable for trading, offering a clearer view of volatility without inferring market trends. Understanding and applying these ATR-based measurements can help enhance trading strategies by clarifying when market conditions are optimal for action.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀25✍3πŸ‘€3πŸ‘1πŸ‘Œ1πŸ‘¨β€πŸ’»1
In trading, coding is integral for developing systematic strategies, enhancing decision-making, and reducing emotional bias. The MetaTrader platform, widely used for trading, supports MetaQuotes Language (MQL) which facilitates the creation of algorithmic trading systems. MQL offers tools like Expert Advisors and custom indicators to automate trading based on predefined strategies.

Understanding the basics of MQL5 is pivotal. This includes variables, Boolean logic, loops, and conditional statements. These fundamentals help build logic into trading algorithms, paving the way for creating automated systems, such as a Simple Moving Average crossover strategy.

To practice, use a demo account to safely test and refine coding skills within MetaTrader's terminal without financial risk. Compiling and debugging are essential steps in the process, ensuring th...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀66πŸ‘Œ5πŸ‘¨β€πŸ’»4⚑3πŸ‘1
An Expert Advisor has been developed to trade when a Three From Within pattern is detected. There are two variations of this pattern. The "Three From Inside" Up pattern features a sequence of candles: the first is a long bearish candle, followed by a smaller bullish candle that trades within the first candle's range, and concludes with a long bullish candle that closes above the first candle’s high. Conversely, the "Three From Inside" Down pattern starts with a long bullish candle, then features a small bearish candle within the first candle’s range, followed by a long bearish candle that closes below the first candle's low. This trading approach restricts to opening a single long or short position when these patterns are present.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀36πŸ‘7πŸ‘¨β€πŸ’»7πŸ‘Œ1
Discover the powerful integration of WebSockets in MetaTrader 5 using the Windows API, eliminating the need for extra software. This article guides you through creating a robust WebSocket client for MetaTrader 5 applications using the WinHTTP library. Key functions like WinHttpOpen, WinHttpConnect, and WinHttpWebSocketCompleteUpgrade are leveraged to establish efficient WebSocket connections. The client supports synchronous data handling, crucial for real-time trading solutions. Practical implementation includes an Expert Advisor that fetches live tick data from Deriv.com, showcasing how custom symbols can be dynamically managed to enhance trading functionalities. Perfect for developers keen on optimizing trading systems through seamless data integration.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #WebSockets
❀69πŸ‘€6πŸ‘4πŸ‘¨β€πŸ’»3πŸŽ‰2
Market Watch in MT4 often includes various symbols from different brokers, with some representing Binary Options. Brokers may use different naming conventions to indicate Binary Options, such as appending ".bo" or "_OP" to symbol names. This can create confusion in accurately identifying Binary Options symbols.

A reliable method for identification involves using the MODE_PROFITCALCMODE in code. This approach effectively detects Binary Option symbols by iterating through all available market watch symbols. By utilizing this method, you can ensure accurate detection of Binary Options among other financial instruments, enhancing your analysis and trading strategy.

πŸ‘‰ Read | VPS | @mql5dev

#MQL4 #MT4 #Trading
❀29πŸ‘Ύ3✍1πŸŽ‰1πŸ‘Œ1πŸ‘¨β€πŸ’»1
Discover an advanced trading strategy that seamlessly integrates MetaTrader 5 with a Python-based adaptive learning model. This system leverages reinforcement learning to dynamically adjust its parameters, transforming trade outcomes into actionable insights. Real-time feedback is captured, transmitted, and utilized to refine decisions, ensuring that every tradeβ€”profit or lossβ€”becomes a learning opportunity. Through Flask-powered endpoints, this continuous feedback loop allows a multi-layer perceptron to evolve, enhancing prediction accuracy. This setup not only bridges trading execution with data processing but ensures the system evolves without manual intervention, adapting to market conditions like an experienced trader. Ideal for developers looking to enhance trading precision and adaptability.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀26✍6πŸ‘Œ2πŸ‘€2πŸ‘¨β€πŸ’»1
Explore the innovative world of algorithmic trading as we dissect the Markets Positioning Codex in MQL5, tailored for equity strategies with a long bias. This article delves into sophisticated signal patterns utilizing RSI and DeMarker oscillators, targeting Nvidia Corp. Our approach employs hidden divergences, slope breaks, and M/W formations to harness market trends and price confirmations, ensuring robust signal development. The meticulous design aims to outmaneuver MetaTrader 5's Strategy Tester intricacies, offering traders and developers insightful solutions for optimizing trades. Understand how discrete pattern combinations and adaptive testing regimes can significantly enhance trading algorithm efficacy and reliability.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀28✍3πŸ‘3πŸ‘Œ2πŸ‘¨β€πŸ’»1
Analyzing and maintaining algorithmic trading strategies presents significant challenges for developers of all skill levels. Novices face difficulties calibrating moving average strategies, while experts continuously tweak complex models like deep neural networks. Both approaches have inherent limitations; machine learning models can be fragile, and human strategies often demand intensive manual configuration at the outset. Proposing an ensemble framework, this study combines supervised models with human intuition, leveraging shared technical indicators to enhance performance dynamically. This synergy optimizes system stability, minimizing the need for constant parameter adjustments and effectively transforming unprofitable elements into a cohesive, successful strategy.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀24⚑4πŸ‘Œ3πŸ‘¨β€πŸ’»1
In Part 40, a Fibonacci Retracement trading system is developed in MQL5. This system calculates retracement levels using daily candle ranges or lookback arrays. It identifies bullish or bearish setups based on close versus open, triggering entries on price crossings of specified levels like 50% or 61.8%, with max trade limits. The implementation includes optional closures on new Fibonacci calculations, points-based trailing stops after a profit threshold, and SL/TP buffers as range percentages. The program is equipped with a visual representation, allowing for real-time monitoring. It combines flexibility and risk adjustment, suitable for traders looking to capitalize on pullback opportunities.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀55✍7🀝6πŸ‘¨β€πŸ’»5πŸ‘Œ4🀯3πŸ‘€2
A straightforward function has been developed to determine if the current time falls between two specified times. This is particularly useful for EAs that need to execute trades only during specific periods of the day. The code accepts two parameters: a start time and an end time. It evaluates whether the current time is within this range and provides a boolean output.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL4 #MT4 #EA
❀29✍3πŸ‘Œ2⚑1πŸ”₯1πŸ‘¨β€πŸ’»1
MetaTrader 5 users often face challenges due to the platform's limited built-in features for direct data transfer to other applications like Excel, which is frequently used for risk management. This process is complex, especially for those without programming expertise. While RTD and DDE allow some data transfer, they require COM interface programming knowledge and are unidirectional. Excel's web solutions offer an alternative, albeit with delays, which might not suit everyone. Developing a solution in MQL5 involves using services, which can operate independently of open charts, making them favorable for ongoing data tasks without disrupting MetaTrader 5’s performance.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #MetaTrader
❀25πŸ‘Œ3πŸŽ‰2πŸ‘¨β€πŸ’»1
Identifying overbought or oversold market conditions remains a sophisticated task, even for experienced traders. Price Action Analysis Toolkit, integrating MQL5 logic, aims to simplify this process by breaking down complex price behaviors into measurable components. The strategy combines three indicators: RVGI for momentum recognition, CCI for market condition measurement, and SMA(30) for trend filtering.

The RVGI detects momentum shifts, with crossovers indicating potential reversals. CCI measures price deviations from statistical means, highlighting overbought/oversold conditions. The SMA reflects broader market trends, helping distinguish between structural market phases.

In MQL5, indicators are implemented through efficient code structures, initialized during OnInit, and maintained with key variables. Helper functions ensure code clarity and ease fut...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #EA
❀60πŸ‘10✍4πŸ‘Œ3😎3⚑2πŸŽ‰1