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
Explore the intersection of algorithmic trading and machine learning with a focus on enhancing the Awesome Oscillator and Envelope Channels using advanced CNN techniques. This approach leverages a dynamic CNN architecture guided by dot product cross-time attention, optimizing kernel and channel sizes. The method captures dependencies across time, crucial for non-stationary financial data. While offering significant adaptability, it incurs computational cost and the risk of overfitting. Alternatives like dilated or adaptive convolutions are also considered for efficiency. Detailed Python implementations illustrate encapsulating Awesome Oscillator and Envelopes Channels, showcasing practical applications for traders and developers.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Indicator
❀30πŸ‘13πŸ‘Œ9πŸ‘3πŸ‘¨β€πŸ’»3😁2🀯2
Machine learning continues to evolve rapidly, propelled by data growth and complex algorithms. Optimization remains crucial, with the ADAM algorithm emerging as a particularly effective method since its introduction in 2014. It was developed by D. P. Kingma and J. Ba for optimizing neural network weights, owing to its adaptive moment estimates.

ADAM's design offers several advantages: simplicity, computational efficiency, low memory requirements, and independence from gradient rescaling. However, its reliance on analytical gradients limits its application scope. A new proposal suggests a population-based adaptation, extending its use beyond neural networks to broader optimization challenges.

This approach involves transitioning ADAM into a stochastic, population-based algorithm. The C_AO_ADAM class implements a version that integrates randomness and hybrid...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Algorithm
❀62πŸ†8πŸ‘7⚑3πŸ‘Œ3πŸ‘¨β€πŸ’»3
An Expert Advisor evaluates the closing of the last five candles to identify trends and initiate a buy trade based on the analysis. Users can define stop-loss and take-profit levels in the input parameters to manage risk and potential profit. This setup provides traders with a structured approach to capture market movements by analyzing recent price action, leveraging programmable functions for systematic trading. It's a strategy that encapsulates decision-making in the forex market, emphasizing adaptability and user control over key trading metrics. The simplicity of input adjustments for SL and TP ensures customization for various trading environments and risk management preferences.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL4 #MT4 #EA
❀40πŸ‘8⚑3πŸ‘¨β€πŸ’»3
Dive into the world of MQL5 with Part 19 of the series, focusing on implementing the Wolfe Wave pattern in algorithmic trading. This segment transitions from theory to execution, teaching how to programmatically identify and trade the Wolfe Wave, a critical price reversal structure. Learn to detect key swing points, apply Fibonacci expansions, and draw crucial trend lines for pattern confirmation. Understand symmetry checks to ensure pattern integrity, while using MQL5 to label and visualize waves directly on the chart. Enhance your EA by implementing logic to confirm trades and manage risks effectively, ensuring reliable patterns and clear insights for traders and developers.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #MQL5
❀42πŸ‘9✍4πŸ‘¨β€πŸ’»4
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