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
In Part 6, a Dynamic Holographic Dashboard is developed in MetaQuotes Language 5 (MQL5). It displays multi-symbol and timeframe indicators such as the Relative Strength Index (RSI) and volatility based on the Average True Range (ATR). Enhanced with pulse animations, sorting, and interactive controls, the tool optimizes traders’ analysis processes.

The dashboard architecture integrates real-time data with sorting, alerts, and visual effects, using arrays for data management and indicator functions. A centralized update loop ensures the UI remains responsive.

Implementation begins with defining metadata and inputs, incorporating arrays for symbol lists and error logging. Global variables manage data and indicators, employing classes for efficient object handling. Initialization and update functions maintain real-time data flow for strategic trading.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Dashboard
❀75πŸ†10πŸ‘¨β€πŸ’»8πŸ‘7πŸ€”3😁2⚑1
The "Eliot Waves" EA targets trendlines via Zigzag for trading when an Elliot retracement occurs. It's equipped with Trailing Stop Loss, Take Profit, and is versatile across time frames, applicable to major forex pairs and NASDAQ stocks. Designed for execution at open candle prices, its parameter "IncreaseFactor" controls lot size increases after losses.

The EA integrates moving averages and trendlines, although only moving averages work in test mode. In live trading, they function concurrently, with the trendline acting as a filter. For accurate tests, employ the "open prices only" setting. This setup aims to enhance trade success probability.

Key inputs involve take profit settings in money/percent, trailing stop features, and drawdown control. Regular optimization every few months is advised, considering use as hedging grid EA or solo trade EA.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #EA
❀43πŸ‘¨β€πŸ’»6πŸ‘4πŸ”₯2⚑1πŸ€”1
A new indicator update enables easy tracking of when a price reaches a specified time across any candle or timeframe. Ideal for those monitoring market sessions or specific time zones, this tool aids in executing trades at precise times, e.g., 9.00 am. Version 1.1 introduces the day of the week feature, aiding in recalling the trading day. Customization options include line width, color, and position of the time text relative to the current candle. This update offers enhanced flexibility and convenience. Ensure it aligns with your trading strategies for optimal results.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀20πŸ‘4πŸ‘¨β€πŸ’»4✍2πŸ‘Œ1
The SuperTrend Indicator provides a robust tool for accurately detecting market trends, integrating seamlessly within price charts. Designed for traders across various styles, including scalping and swing trading, it adjusts for volatility using the Average True Range (ATR) and adapts swiftly to reversals.

Highlighted features include real-time trend updates, specific buy/sell signals with price line interaction, and built-in noise reduction. It functions across all timeframes and instruments such as forex, stocks, and cryptocurrencies, making it versatile for traders of all experience levels. The indicator can be paired with strategies like EMA or support/resistance approaches.

Key settings include the ATR period, multiplier, price type, line width, and customizable trend colors. For application, a closing price above the SuperTrend line implies a bul...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Indicator
❀25πŸ‘6πŸ‘€4πŸ‘Œ1πŸ‘¨β€πŸ’»1
Explore the evolution of trading analytics through Candle-Range Theory (CRT) in MetaTrader 5, a groundbreaking framework that defines market movements with precision. By categorizing each completed candle into Large-Range, Small-Range, Inside Bar, or Outside Bar based on ATR, CRT offers an innovative toolset. The CRangePattern class, CRT Indicator, and CRT Expert Advisor collectively enable advanced, non-repainting trading signals, with minimal CPU usage and full customizability. Suitable for diverse instruments, CRT’s modular architecture enhances strategy portability, empowering traders and developers to seamlessly integrate actionable insights into their trading systems while ensuring robust compatibility with future trading environments.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Algorithm
❀24πŸ‘10πŸ‘¨β€πŸ’»3πŸ‘€1
The exploration into enhancing a News Headline EA has revealed promising strategies for trading around high-impact news like Non-Farm Payroll releases. By developing a MetaTrader 5 Expert Advisor (EA), the goal was to automate post-news trading by observing historical chart data to understand market behaviors following such events. The EA utilizes algorithmic precision to highlight NFP release times, allowing traders to study and identify patterns in price movements. By leveraging custom logic for NFP event identification and dynamic back-testing, developers can refine entry setups that target sustained post-event momentum, enhancing strategy efficacy and precision for algorithmic trading solutions.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀24πŸ‘7πŸ‘¨β€πŸ’»4πŸ”₯1
Python and MQL5 provide alternatives for task scheduling beyond repetitive tasks. In MQL5, OnTimer provides basic scheduling for functions, a method with limited flexibility for tasks requiring different time intervals. For algorithmic trading, Python's schedule module offers a human-friendly approach to scheduling tasks with more precision based on day or week timings. This module's advantage lies in its ability to handle various scheduling needs without sacrificing code simplicity.

MQL5 can adopt a similar structure, creating a system where schedules are managed with a class, allowing task execution based on user-defined intervals. This can be beneficial for trading activities that require precise timing for actions like opening trades or sending trading reports.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Algorithm
❀33πŸ‘10✍4πŸ‘¨β€πŸ’»4
Traders who favor minimalistic charts can benefit from this lot size calculation script for Forex and CFD instruments. Choose between RiskByPercent for percentage-based risk or RiskByAmount for a fixed value. Enter your stop loss in pips suitable for 4-digit brokers; the script adapts for 5-digit brokers. If the calculated lot size falls below or above broker limits, the script adjusts to the nearest allowable value. Alerts provide details on the calculated lot size, risk amount, converted stop loss, and tick value. This tool aids in precise trade entry and can be customized or integrated with existing Expert Advisors for enhanced functionality.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL4 #MT4 #Forex
❀32πŸ”₯6πŸ‘5πŸ‘¨β€πŸ’»4✍3πŸ‘Œ2
Efficient trade management is crucial for optimizing returns and minimizing risk. This script is designed for traders who prefer uncluttered charts, enabling precise lot size calculation for Forex or CFD trading. Choose between two options: RiskByPercent for managing risk by a percentage of equity, or RiskByAmount for a fixed monetary risk. Input your stop loss in pips, especially relevant for 4-digit brokers. The script intelligently adapts for 5-digit brokers and respects broker-imposed lot size restrictions. Upon calculation, it provides an alert detailing the lot size, risk amount, adjusted stop loss, and instrument tick value. This versatile script can be customized or incorporated into an existing Expert Advisor to align with specific trading strategies.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #script
❀39πŸ‘5πŸ‘Œ3πŸ‘¨β€πŸ’»2πŸ‘1
Explore the innovative approach to elevating your MetaTrader 5 logging with the Logger class, providing structured message outputs for enhanced readability. Discover how connecting logs to the Seq system enables real-time analysis with an intuitive JSON format and SQL queries, streamlining the identification of application issues. Learn how to implement the autonomous Logger class, using clear severity levels, which fits seamlessly within your code without additional dependencies. Delve into importing existing logs into Seq for comprehensive analysis. This technique empowers developers to efficiently debug and grasp application events, transforming how trading systems are monitored and optimized.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Logging
❀57πŸ‘9πŸ‘¨β€πŸ’»5✍3
A new tool is available featuring GUI buttons "Close Buys" and "Close Sells" with options for customizable colors, positions, and text. It integrates dynamic visibility, hiding buttons when no positions exist, which is optional for user preference. The tool provides efficient position closure by allowing traders to close all buy or sell positions with a click. It also displays net profit, taking into account profit, swap, and commissions. Event handling is executed through a 100ms timer for updates and utilizes chart events for button clicks. The tool calculates net profit by incorporating commission data from trade history, facilitating simplified trade management on specific symbols. Users are encouraged to provide feedback or report issues on the MQL5 CodeBase page or via the MQL5 community for future enhancements.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Trading
❀38⚑4πŸ‘4πŸ‘¨β€πŸ’»3
The MT5 indicator identifies bearish spike formations through a specific three-candle pattern: Red-Green-Red. The first and third candles are strong bearish spikes with bodies over 70% of the candle range. The middle candle is a bullish retracement. When detected, the indicator visually marks this "supply zone" with a box around the high/low of these candles. An entry line is plotted at the middle candle's open price. The line remains until the price returns to that level, indicating a potential re-entry point.

This tool operates on the Smart Money Concept, highlighting mitigation zones and supply/demand imbalances. Traders can leverage this visual aid for return-to-zone trading opportunities, especially in Crash or inverted Boom markets. It provides insights when combined with other indicators such as EMA or order block confirmations. This systema...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀38πŸ‘5πŸ‘Œ3πŸ‘¨β€πŸ’»3✍2
The CBitBuffer class is vital for bit-level data serialization in MQL5, essential for efficient data storage and retrieval, especially in network communication or file compression. With support for a wide range of data types, the class optimizes space using techniques like Variable-Length Quantity (VLQ) with ZigZag encoding. This approach can significantly save space when dealing with frequently small integer values.

Robust error handling is ensured through an ENUM_BIT_BUFFER_ERROR enum alongside GetLastError() and GetLastErrorString() methods. The class design is optimized with features like internal buffering and exponential array growth to enhance performance. Updates as of 2025 improve operations by eliminating restrictions on mixed read/write processes and enhancing clarity. Such updates contribute to maintaining data integrity, thereby broadening ...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Data
❀37πŸ‘4πŸ‘¨β€πŸ’»4πŸ€”1
The recent article presents an extended examination of combining multiple indicators in a single chart subwindow. The focus was on modifying object class code to introduce new features and enhance flexibility. By utilizing structures for variable organization, chart configurations become more manageable, enabling users to customize asset displays with fixed widths and periods.

The new macro implementation facilitates code reuse, while the updated syntax allows users to define time periods with minimal ambiguity. An important enhancement involves the default settings file, ensuring consistency across assets when specific settings are unavailable. Understanding MetaTrader 5's logic in file searching aids efficient template management.

These advancements emphasize the significance of structured programming, optimizing code reuse, and reducing potenti...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀54πŸ‘11πŸ‘¨β€πŸ’»7πŸ‘€4πŸ‘3πŸ‘Œ3
A new indicator has been developed to detect a specific bullish spike pattern using a 3-bar configuration. It identifies significant market movements by analyzing three consecutive candles: a large green candle, followed by a red one, and then another large green candle. This setup indicates a potential bullish zone.

Upon detection, the indicator draws a blue rectangle spanning the high/low range of these candles. Additionally, a lime green entry line is plotted at the open price of the second candle. This line persists until the price revisits it, at which point it is stopped.

The indicator's core functions include pattern detection on each tick, drawing the box and line, and checking for mitigation. It is optimized for Boom 500 and Boom 1000, providing automatic detection and visualization of trading entries. This tool helps recognize genuine sp...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀40πŸ‘¨β€πŸ’»8πŸ‘6πŸ‘Œ1
To consistently profit in trading, understanding the interrelationship of win rate, reward-to-risk ratio (RRR), and position sizing is crucial. Many traders focus overly on win rates, neglecting how RRR and position size impact key metrics like profit factor and drawdowns. A robust system blends these elements seamlessly, optimized through back-testing and Monte Carlo simulations. These simulations, run in Python, model thousands of potential outcomes, offering clarity on a system's viability over time. Successful trading mandates a fine balanceβ€”where the system's win rate meets the minimum required RRR and optimal position size to maximize gains while controlling risk.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Trading
❀28πŸ‘8πŸ‘¨β€πŸ’»4πŸ‘Œ3
Integrating MQL5 with Python using socket programming enhances data sharing capabilities for machine learning tasks. MQL5's limitations in re-creating advanced libraries like those available in Python make this approach efficient. By exporting chart data from MetaTrader to Python, developers leverage robust machine learning libraries for complex data analysis. A MetaTrader application sends tick info to a Python server via sockets, maintaining continuous data flow to connected clients for customized processing.

Server-client architecture supports data transfer, with MetaTrader feeding tick data, which is handled and broadcasted by the Python server. This infrastructure is adaptable with different scripts, indicators, and languages, reducing reliance on Windows OS. Developers can achieve effective cross-platform solutions, fostering flexible trading stra...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Tech
❀38πŸ‘4πŸ‘¨β€πŸ’»4
The Gator Oscillator and Accumulation/Distribution (AD) are powerful tools for traders seeking trend confirmation via momentum and volume indicators. While the Gator is directionally neutral, it tracks convergence/divergence phases, essential for recognizing trend initiations or exhaustions. The AD measures market accumulation/distribution through volume, identifying buying or selling pressure divergences from price.

Combining these in trading systems aids in confirming the strength of trends, reducing false signals. Patterns in combinations, such as volume-confirmed breakouts or trend continuations, offer robust insights. Implementing these in MQL5, backtesting results highlight their utility. Attention to timing, especially during low-volume periods, remains crucial.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀53πŸ‘11πŸ‘¨β€πŸ’»3πŸ‘Œ2✍1πŸ”₯1πŸ‘€1
Efficiently handling CSV files is a crucial skill in software development. Here's a method to read a CSV file row by row. This approach splits each row's string into tokens using a specified delimiter, such as an underscore (_) or a pipe (|). This functionality is beneficial for retrieving data from CSV files and integrating it back into your application for further processing or analysis.

When dealing with CSV files, ensure the file path is correct and accessible. Using built-in libraries or modules can simplify the process and manage file access securely. Remember to handle exceptions to deal with potential errors such as missing files or incorrect delimiters. This technique is scalable and adaptable for various data extraction and manipulation needs.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL4 #MT4 #CSV
❀30πŸ‘4πŸ‘¨β€πŸ’»2πŸ‘€1
The Market Profile indicator's efficiency has been the focus of recent technical optimization efforts. A key issue identified is the excessive resource consumption due to the creation of thousands of graphical objects for daily bar representation. This inefficiency is resolved by employing the CCanvas class, which allows rendering all necessary market profiles using a single graphical object per day. This approach contrasts sharply with the previous method, resulting in substantial resource savings.

The Market Profile indicator is enhanced through a new class structure - CMarketProfile. With this structure, one graphical object efficiently covers daily trading sessions by using a canvas rather than individual graphical components. By integrating the CCanvas class, this restructuring enables not only a sharp reduction in resource consumption but als...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀21πŸ‘6πŸ‘¨β€πŸ’»3