MQL5 Algo Trading
388K 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
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
The Open Range Breakout (ORB) indicator for MetaTrader 5 offers a systematic approach to detecting price breakouts by analyzing the initial trading session range. This indicator identifies critical support and resistance levels established during the opening minutes, aiding in high-probability breakout and retest strategies.

The ORB automatically calculates these levels based on user-defined times, offering visual and audio alerts. Key features include identification of breakout signals and multiple profit targets based on the range's size. Traders can configure the parameters for better precision, such as adjusting the opening range period, display options, and alert settings.

It calculates the opening range by determining the highest and lowest prices within the set period and extends these lines throughout the trading session. Profit targets are e...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Indicator
❀37⚑7πŸ‘Œ3πŸ‘€3πŸ‘¨β€πŸ’»1
Dive into the advancements in financial forecasting with the Hidformer model, a Transformer-based innovation optimized for time-series analysis. Designed to improve accuracy and handle the complexity of temporal relationships, this model excels by efficiently identifying long-term dependencies using unique attention mechanisms. Hidformer stands out by utilizing dual encoders; one analyzes trends, while the other discerns frequency domain dependencies to filter out market noise, essential for volatile asset forecasting. The integration of recursive and linear attention methods reduces computational demands and enhances prediction stability, offering a robust solution for developers aiming to refine their algorithmic trading strategies in MetaTrader 5.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #NeuralNet
❀18πŸ‘Œ2✍1πŸ‘¨β€πŸ’»1
Programming architecture ensures reliability and scalability. The Model-View-Controller (MVC) pattern helps in organizing code into three components: model (data and logic), view (presentation), and controller (user interaction). Applying MVC in MQL5 for table models enhances clarity and maintenance.

Create classes for table elementsβ€”cells, rows, and modelsβ€”utilizing linked lists for efficient data storage. The CList class in MQL5 facilitates moving and managing rows and cells dynamically, crucial for file operations. Implement an inherited CList class to enable file-based operations and object creation through the CreateElement() method. This approach allows the architecture to adapt as applications grow, ensuring structure and flexibility.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #MVC
❀27πŸŽ‰4πŸ‘Œ4⚑3πŸ‘¨β€πŸ’»1
Revolutionize your MetaTrader 5 trading strategy with a dynamic Fibonacci-driven EA. This innovative approach leverages Fibonacci ratios to anticipate key price movements, transforming market rhythm analysis into actionable insights. Automate swing point detection and Fibonacci level calculations for real-time, disciplined trading decisions. Visualize entire trade pathways with dynamic arrows highlighting anticipatory retracement and extension targets, moving beyond passive chart observations. Integrate meticulous risk management by matching stop-loss and profit targets with Fibonacci architecture. This system doesn’t just execute trades; it enhances your trading intuition through clear visualization and algorithmic precision, setting a new standard in algorithmic trading education.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Algorithm
❀29πŸ‘Œ5πŸ‘¨β€πŸ’»5
New technical analysis tools can streamline trading. Combining multiple indicators into a single hybrid indicator is effective for reducing chart clutter and improving decision-making. A new oscillator called the Pseudo Pearson Correlation (PPC) is presented. It integrates the Relative Strength Index (RSI), Money Flow Index (MFI), and DeMarker (DEM) to simplify market analysis by quantifying relationships between these indicators.

The PPC oscillator offers insights into momentum and market trends without providing direct trade direction. It identifies zones of convergence or divergence in indicator signals, helping traders anticipate potential price movements. This technique aids in designing effective trading strategies by leveraging correlated and non-correlated market conditions, enhancing overall trading systems.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀55πŸ‘Œ8πŸ†3⚑2πŸŽ‰1πŸ‘¨β€πŸ’»1
Calculating the margin required for a trading lot in MQL5 involves specifying the leverage factor to determine the precise margin requirement. When working with FX and metal symbols, it is vital to ensure that the code accounts for variations specific to cent accounts or CFDs/cryptocurrencies, as these can introduce discrepancies. Accuracy can be improved by refining the approach to accommodate these exceptions. Continuous learning and adapting the code to handle different account types and assets will enhance precision. Peer input and collaboration can facilitate code optimization, offering valuable insights from experienced professionals to elevate coding practices.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #MQL5
❀24⚑7✍1πŸ‘¨β€πŸ’»1
Announcement for MetaTrader 5 Users: The Clean Market Watch script optimizes your trading workspace by automatically clearing all symbols from your Market Watch window in seconds. It is engineered for traders who accumulate a clutter of symbols and seek a streamlined experience. Manually removing symbols can be tedious, but this tool automates the process, providing efficiency.

The script employs an effective algorithm that processes symbols in reverse order to maintain stable array indexing. Safety mechanisms prevent infinite loops, and all actions are logged for transparency. Users receive real-time feedback and a completion notification for assurance of task execution.

To use, open MetaTrader 5, locate the CleanMarketWatch script within the Scripts folder, and execute with a simple chart attachment. Post-execution, you'll need to manually re-add symbo...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #script
❀32🀯4πŸ†1πŸ‘¨β€πŸ’»1πŸ‘€1
The application of one-position-type strategies in live market environments presents an analysis based on Nvidia Corp’s stock (NVDA). Training and testing were conducted over distinct time periods, utilizing signals derived from multiple oscillator integrations, specifically RSI and DeMarker. Each pattern analyzes specific market movements, aiming to optimize entry and exit points across varying market conditions.

Pattern-5 focuses on slope confluence with range expansion, where synchronized momentum and price movements are logged. The buy signals are derived when RSI and DeMarker conditions align, demonstrating increased trader activity and potential market volatility.

Forward testing of Pattern-6 capitalizes on leading price movements with lagging indicators, identifying pullback entries for order continuation. The setup confirms trend strength w...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Strategy
❀22✍1πŸ‘¨β€πŸ’»1
Discover the latest advancements in MetaTrader 5 with our AI-powered trading system enhancement. We've introduced efficient chat deletion and an intuitive search functionality. Manage conversations with ease by utilizing interactive delete buttons within the sidebar and history popups. The new search popup offers real-time filtering, empowering traders and developers to locate key discussions swiftly by keywords or content. This upgrade streamlines user experience, reduces clutter, and enhances productivity by maintaining focus on relevant data during critical trading moments. Experience a more organized and powerful trading assistant integrated seamlessly into your MQL5 environment.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #AITools
❀30✍2πŸ‘¨β€πŸ’»1
Explore advanced methods to enhance lot and Stop Loss retrieval functions in algorithmic trading using MQL5’s robust control libraries. Advanced functions are refined with debugging tools for accuracy, integrating efficient calculation methods for lot sizes and Stop Loss settings. Innovative features like GetLotByRiskPerOperation streamline risk-based calculations without needing Stop Loss distances. Further delve into creating dynamic panels and controls in MQL5 with functions for labels, buttons, and combo boxes, offering a structured and interactive risk management interface. Engage with practical solutions for better trading decisions and streamlined developer workflows, fostering an efficient trading environment with enhanced user interaction.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Trading
❀46πŸ‘€3πŸ‘¨β€πŸ’»1
This technical snippet illustrates a method for creating a button directly on a chart interface, facilitating improved user interaction. Once activated, this button executes a function designed to delete all existing orders. The process is comprehensive, accounting for diverse scenarios to ensure the function handles exceptions smoothly. Error messages are incorporated to provide immediate feedback in case of execution issues, enhancing user awareness of any operation complications. This implementation can serve as a practical model for integrating interactive components within trading platforms, demonstrating effective management of order cancellation processes.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Script
❀19πŸ”₯1πŸ‘¨β€πŸ’»1
This article explores two innovative approaches for identifying profitable trading strategies using MetaTrader 5. The white-box solution leverages singular value decomposition to uncover strategy combinations attuned to current market trends, offering clear insights and straightforward implementability. In contrast, the black-box approach employs deep neural networks to adaptively select strategies based on real-time market behavior, though it requires extensive configuration. Both methods begin with MQL5 scripts for data acquisition and advance to sophisticated analyses using standard Python libraries. By demonstrating practical implementation in MQL5, the article underscores the potential of automated strategy discovery to enhance trading effectiveness amidst a rapidly evolving algorithmic landscape.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Algorithm
❀28πŸ”₯3πŸ‘¨β€πŸ’»1
Discover a cutting-edge approach to algorithmic trading with our comprehensive Delta-Gamma hedging framework on MetaTrader 5. By integrating robust Greek calculations directly into your Expert Advisor, you can automate the intricacies of Black-Scholes Greeks for dynamic portfolio management. Our system dynamically monitors delta exposure, leveraging high-frequency adjustments to maintain delta-neutral positioning while capitalizing on gamma-driven market shifts. Advanced risk management layers ensure precise execution, balancing between delta hedging and gamma scalping to capture short-term volatility. Experience enhanced trading precision and consistency with our automated solution, designed for traders focused on market-neutral strategies.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀36πŸ”₯2πŸ‘¨β€πŸ’»1
The Candle Range Theory (CRT) trading system is advanced in part 41 with a focus on the Accumulation, Manipulation, and Distribution (AMD) phases. This MQL5 strategy enhances the identification of key market phases on a selected timeframe for precise trading decisions.

The system determines accumulation phases, detects price breaches with optional depth filtering, and confirms reversals for trade entry during the distribution phase. Risk management is integrated with configurable stop-loss, take-profit methods, trailing stops, and position limits per direction.

Implementation includes rendering visual aids on the chart, such as colored rectangles and labeled levels, utilizing MQL5 capabilities to provide an intuitive monitoring experience for traders. This forms a robust foundation for CRT strategy customization and backtesting.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #MQL5
❀56πŸ‘¨β€πŸ’»1
Candlestick patterns remain a critical component of technical analysis, offering insights into market dynamics. They document buyer-seller interactions and reflect market sentiment, often predicting future movements. The bullish engulfing pattern exemplifies this predictive ability by indicating potential buying strength. Developers utilizing the MQL5 environment can automate and enhance candlestick studies.

CandlePatternSearch.mq5 is an Expert Advisor designed for MetaTrader 5. It detects and highlights popular candlestick formations on charts, enhancing traders' abilities to analyze patterns across instruments and timeframes. Features include a comprehensive pattern library, interactive on-chart controls, real-time monitoring, and customizable parameters for alert configurations.

This EA consolidates technical analysis by transforming candle...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Candlestick
❀36πŸ‘€14✍5πŸ‘¨β€πŸ’»2
The code provided offers the capability to configure alerts triggered upon the inception of a new bar, accompanied by a customizable sound notification. This functionality is essential for traders and developers seeking immediate updates without real-time monitoring. The implementation is designed to integrate seamlessly into existing systems, ensuring consistent notifications. Users can define specific audio cues, enhancing situational awareness during periods of significant market activity. Incorporating such an alert system enhances responsiveness and decision-making efficiency, a vital component for maintaining competitive advantages in algorithmic trading and automated strategies.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL4 #MT4 #script
πŸ‘16❀13πŸ‘¨β€πŸ’»2πŸ‘Œ1
Discover cutting-edge enhancements in the MetaTrader 5 library designed for algorithmic trading. The refined structure splits a monolithic codebase into reusable components, optimizing execution through modularity. Key improvements involve efficient input handling; only active charts now process keystrokes, reducing resource demands. The new Crosshair tool simplifies interfacing with charts, while the Trendline tool adds flexibility with customizable extrema. The upgrade ensures improved responsiveness in environments with numerous open tabs. Developers benefit from a revamped data management approach, storing global variables locally within classes, enabling independent usage and runtime modification. Embrace these advancements for robust trading systems enhancement.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #ExpertAdvisor
❀52πŸ‘Œ4πŸ†3πŸ‘¨β€πŸ’»1