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
Examining the integration of Q-Learning and Markov Chains to refine the learning process of a multi-layer perceptron (MLP) network reveals potential improvements in models for Expert Advisors. Q-Learning, a reinforcement learning algorithm, quantifies actions as rewards during training rounds, referred to as episodes.

Reinforcement learning, often categorized alongside supervised and unsupervised learning, balances exploration and exploitation, updating a Q-Learning map to track suitable actions in different states. This map utilizes a learning rate, reward, and discount factor.

Markov Chains, supplementing Q-Learning, transition between states based on probabilities. Transition matrices calculate state importance, memorylessly transitioning from current states. This approach aids in training the Q-Learning map and updating actions efficiently....
#MQL5 #MT5 #machinelearning #trading

Read more...
❀44πŸ‘34πŸ‘¨β€πŸ’»4✍3πŸ‘3
Since 2019, this personal library has been developed to facilitate position manipulation and retrieve various information. Key functions include:

- `SymbolOpenPipsMagic`: Returns open pips from all positions by magic number.
- `SymbolOpenPercentageMagic`: Returns percentage from open positions by magic number.
- `SymbolOpenPoints`: Returns open points/pipets trades.
- `SymbolOpenPositionsClose`: Closes all open positions.
- `SymbolOpenPositionsSpecific`: Returns the number of specific open trades by comment.
- `SymbolPositionResultMoney`: Returns the result from a position at a specified price target in money.

Other utilities handle pending orders, calculated margins, risk/reward ratios, and normalize volumes. Chart manipulation and candle data extraction are also streamlined. Additional functions support account status checks, managing historical data, a...
#MQL5 #MT5 #forex #trading

Read more...
❀26πŸ‘23πŸ‘¨β€πŸ’»2⚑1😁1πŸ€”1🀨1
Explore the potential of AI in trading with this comprehensive guide on algorithmic strategies for MetaTrader 5. Discover how to uncover key relationships between currency and precious metals markets, leveraging xauusd, xpdusd, and usdcad pair data. Learn how to fetch and preprocess this data using MQL5 and Python, ensuring clean datasets for accurate modeling.

Dive into various forecasting models, including Linear Regression and Linear Support Vector Regressor (LSVR), and understand their performance using 5-fold cross-validation. Finally, export your finely-tuned model to ONNX format and integrate it with your MetaTrader 5 Expert Advisor for smarter trading decisions.
#MQL5 #MT5 #trading #AI

Read more...
πŸ‘21❀12✍7πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸ‘Ύ2πŸ‘€1
The U-shaped Transformer algorithm enhances the vanilla Transformer architecture for time series forecasting by retaining high frequency context. The innovative approach involves a two-stage training process: pre-training with diverse datasets to learn dependencies and reduce noise, followed by fine-tuning on specific problems. This method ensures efficiency, requiring less computational power for fine-tuning. Key features include patch-based embedding for extracting multi-scale features, convolutional layers, and skip-connections for fast data transfer, enhancing model robustness and generalization. Implementing these techniques in MQL5 involves advanced neural network layer handling and dynamic positional encoding, providing traders and developers a powerful tool for improved time series analysis.
#MQL5 #MT5 #Timeseries #AI

Read more...
πŸ‘25❀7⚑4πŸ‘2πŸ‘¨β€πŸ’»2πŸ’”1
Discover how to enhance your trading charts with custom objects in MQL5! This article discusses how to create and modify chart objects to provide visual clarity and actionable insights for traders and developers. Learn to use objects like rectangles, trend lines, and text labels to highlight key price levels, monitor trades, and display real-time performance data. This practical guide walks you through building an Expert Advisor that visualizes entry points, stop losses, and take profits directly on the chart, dynamically updates with market changes, and provides historical trade analysis. Perfect for those looking to deepen their algorithmic trading skills with MQL5.
#MQL5 #MT5 #MQL5 #Trading

Read more...
❀42πŸ‘28✍8πŸ‘4🀑3πŸ‘¨β€πŸ’»3
New feature added to allow direct specification of the starting point for the Parabolic SAR. Users can now set the initial value for more precise control over the Parabolic SAR calculation. Parameters include Trailing Mode options: None, Trailing Fixed, and Trailing Fixed Parabolic SAR. This enhancement enables tailored adjustments in your technical analysis, offering customizable options to fit diverse trading strategies. This update aims to provide advanced users with greater flexibility in setting and refining their indicators, contributing towards more accurate market predictions and better-informed decision-making.
#MQL5 #MT5 #Indicator #AlgoTrading

Read more...
πŸ‘37❀13πŸ‘3πŸ‘¨β€πŸ’»2πŸ†1
Streamline Your Algorithmic Trading with Advanced EA Integration

Harness the power of efficient EA design in MetaTrader 5! Our strategy-centric approach seamlessly integrates multiple trading strategies into a single Expert Advisor (EA), optimizing performance and managing drawdown risks. We employ genetic optimization to fine-tune strategy parameters across symbols and timeframes, ensuring robust trading results.

Utilize optimization cache files for storing intermediate results and leverage SQLite for scalable database management. Our systematic process, including event-specific handlers and data frames, ensures precise data collection from MetaTrader 5 testing agents. This comprehensive framework is ideal for both seasoned developers and those new to EA development. Dive in and elevate your trading strategies!
#MQL5 #MT5 #EA #Strategy

Read more...
❀20πŸ‘15πŸ‘¨β€πŸ’»3✍2πŸ‘1
Part 5 of the series continues the integration of MetaQuotes Language 5 (MQL5) with Telegram, focusing on allowing the Expert Advisor (EA) in MetaTrader 5 (MT5) to receive and interpret commands from Telegram users. The objective is to enable two-way communication, where the EA not only sends messages but also intelligently responds to user commands.

First, the necessary environment is set up by including essential MQL5 libraries for trade management and data handling. This prepares the EA to manage complex data structures received from Telegram.

Subsequently, classes are created to retrieve and process chat updates from JSON data returned by the Telegram API. The classes parse the JSON data to extract chat updates and user commands, essential for dynamic communication between MT5 and Telegram.

The EA decodes and interprets incoming data from the Telegr...
#MQL5 #MT5 #EA #AlgoTrading

Read more...
πŸ‘24❀19πŸ‘¨β€πŸ’»3✍2⚑1πŸ”₯1πŸ‘1
Enhance your trading strategy with a dynamic multi-pair Expert Advisor (EA) designed to capitalize on correlations and inverse correlations between currency pairs. By defining a primary currency pair to signal trades for other pairs, this EA optimizes performance during high-impact market events. The system is flexible, allowing traders to input and modify currency pairs and uses the RSI indicator to generate trading signals. Efficiently trade correlated pairs dynamically, adjusting for market conditions. This innovative approach not only boosts consistency but also leverages relationships between currency pairs to maximize trading opportunities and manage risks effectively. Explore smarter trading today.
#MQL5 #MT5 #Algorithm #EA

Read more...
πŸ‘22❀9⚑3πŸ‘2πŸ‘¨β€πŸ’»2
Dive into the world of Gaussian Process Kernels in algorithmic trading with this insightful exploration of linear and MatΓ©rn kernels! Linear kernels are ideal for capturing long-term trends with computational efficiency, making them perfect for assets with clear upward or downward price movements. On the other hand, the MatΓ©rn kernel, with its adjustable smoothness, excels at modeling both trending and volatile data, providing nuanced forecasts. By implementing these kernels in MetaTrader 5 via MQL5, traders and developers can leverage sophisticated models to navigate the complexities of financial time series, optimize performance, and handle noisy data with precision.
#MQL5 #MT5 #EA #Algorithm

Read more...
πŸ‘15✍10❀5πŸ‘¨β€πŸ’»2
Potentially infinite ways exist for modern investors to integrate AI into their trading strategies. In a series of articles, we explore the vast range of AI applications in trading. Our goal is to identify a strategy suitable for specific investor profiles.

The Financial Times Stock Exchange 100 (FTSE100) tracks the performance of the 100 largest companies on the London Stock Exchange. Created in 1984 with 1,000 points, it trades around 8,000 points. Companies within the index are weighted based on market capitalization.

UK government issues debt instruments called gilts. Gilts are fixed-income securities available in two types: conventional and index-linked. Conventional gilts pay a fixed coupon, while index-linked adjust for inflation. Gilts offer predictable income and low default risk.

Bonds and stocks have an inverse relationship: when stock ...
#MQL5 #MT5 #AITrading #algorithm

Read more...
πŸ‘31❀13πŸ‘5πŸ‘¨β€πŸ’»4
A script has been developed to enhance chart analysis by creating a dynamic text object. This text not only rotates but also adjusts its position according to price levels. It changes color and content in real-time based on its location, providing a visually engaging and informative element to the chart. Such functionality can be especially advantageous for traders seeking to add annotations or dynamic markers to their trading charts, enhancing the situational awareness and decision-making processes. This tool seamlessly integrates with chart environments, aiding in the visualization of important market data.
#MQL4 #MT4 #script #Indicator

Read more...
πŸ‘17❀5πŸ‘2πŸ‘¨β€πŸ’»2
The PrevDayLines.mq4 script is designed for MetaTrader 4, automatically plotting three essential price levels from the previous trading day on your chart. These levels include the highest price (Max), the lowest price (Min), and the average price (Avg), offering a clear visual reference for key support and resistance areas.

The script is fully customizable, permitting adjustments to the color, thickness, and style of lines to match user preferences.

Key features include automatic drawing of these price levels, customizable visuals with parameters for color, width, and line style, and straightforward integration, allowing immediate display on any chart. This tool is beneficial for traders who use historical price levels to identify potential market turning points.
#MQL4 #MT4 #EA #script

Read more...
πŸ‘18❀14πŸ‘3πŸ‘¨β€πŸ’»1
The CDebugLogger class offers a comprehensive logging solution optimized for MQL4/5 environments. It serves as a vital tool for developers focused on precise application monitoring and debugging.

**Key Features:**

- **Multiple Log Levels:** Supports INFO, WARNING, ERROR, and DEBUG levels, enabling developers to filter messages by significance.
- **Timestamp Inclusion:** Customizable timestamps for logging, essential for time-sensitive issue tracking.
- **File Logging:** Includes robust options for file logging, allowing specification of log file paths and CSV format for easier analysis.
- **Contextual Information:** Allows inclusion of function signatures, file names, and line numbers in logs for precise issue pinpointing.
- **Silent Keywords:** Ability to silence logs containing specific keywords to avoid logging sensitive information.
- **Filter Keywords:** En...
#MQL5 #MT5 #MQL #EA

Read more...
πŸ‘28❀9πŸ‘5πŸ‘¨β€πŸ’»2
Discover a new chart type for MetaTrader 5β€”ideal for swing, position, and portfolio trading! We're creating Mountain and Iceberg charts using simple MQL5 code. These charts enhance profit/loss visibility at a glance with different colors, making them user-friendly for long-term traders. Despite its simplicity, this coding approach is robust and integrates seamlessly with your favorite indicators and EAs. This introduction to custom charting in MetaTrader 5 highlights its flexibility and potential, proving that with a little creativity, this platform can offer far more than many realize. Dive in and elevate your trading analysis!
#MQL5 #MT5 #Indicator #MQL5

Read more...
πŸ‘39❀22⚑7πŸ‘Œ3✍2πŸ‘¨β€πŸ’»1
A new Expert Advisor (EA) aims to monitor support and resistance breaks on H4 and H1 timeframes. Users only need to configure their charts to the H1 timeframe and apply the EA. After configuration, provide your Meta Quote ID from your phone to MetaTrader on your PC. This setup enables receiving notifications on breakout events for H1, H4, and moving averages. The process is straightforward, ensuring you stay updated on critical market movements efficiently.
#MQL4 #MT4 #EA #Strategy

Read more...
πŸ‘19❀13⚑12πŸ‘¨β€πŸ’»2
Improving library classes:

Add code in \MQL5\Include\DoEasy\Defines.mqh to include the new graphical element type. Create an enumeration for standard images like Info, Warning, Error icons. Define new integer properties increasing the total from 122 to 129. Include new string properties and criteria for sorting graphical elements.

Update \MQL5\Include\DoEasy\Data.mqh to add new message indices and corresponding text messages. Modify \MQL5\Include\DoEasy\Objects\Graph\GBaseObj.mqh to return new control descriptions via the TypeElementDescription() method.

The \MQL5\Include\DoEasy\Objects\Graph\GCnvElement.mqh file requires methods for writing pointers to base objects for ToolTip associations. Ensure element opacity and display flags can be overridden in inherited classes. Introduce SetOpacityDraw method for shadow objects.

In \MQL5\Include\DoEasy\Obje...
#MQL5 #MT5 #Tooltip #WinForms

Read more...
πŸ‘42❀35πŸ†7πŸ”₯5πŸ‘¨β€πŸ’»3
The Dual Profit Closer EA enhances trading strategies by managing and closing buy and sell orders based on defined profit thresholds.

**Features:**

**Separate Buy & Sell Order Management:** The EA tracks buy and sell orders individually, closing each at the user-specified profit level, allowing for precise control over trading strategies.

**Real-Time Profit Tracking:** Provides live updates of overall buy and sell profits directly on the chart, keeping traders informed without the need for reviewing multiple reports.

**Customizable Profit Thresholds:** Users can easily set and adjust profit levels for both types of orders, enabling automatic order closure at optimal gain points.

**Avoid Broker Manipulation:** Instantly closes deals when overall profit for either buy or sell orders reaches the threshold, bypassing the need to set take profit (TP) or stop ...
#MQL4 #MT4 #EA #Scalper

Read more...
πŸ‘38❀18πŸ†4πŸ‘¨β€πŸ’»3πŸ‘Œ2
A new user-centric dialog panel is now available, offering dynamic calculations and displaying the maximum lot size permissible on brokerage accounts across various order types: buy, sell, pending buy, and pending sell. This tool bases its calculations on the available margin, ensuring accuracy for numerous securities including forex pairs, commodities, cryptocurrencies, and indices. The intuitive design allows the dialog to be minimized or closed directly from the panel, enhancing user experience without compromising functionality. This enhancement aims to streamline trading operations and improve decision-making efficiency for professional traders and developers.
#MQL5 #MT5 #Algorithm #Indicator

Read more...
❀22πŸ‘11πŸ‘¨β€πŸ’»3πŸ‘1πŸŽ‰1
An in-depth analysis focuses on Deriv's Boom 1000 synthetic market. This market is marked by its volatile bull and bear candles, making it notoriously unpredictable. The method of sending limited tick data results in breached stop losses with guaranteed slippage, hence many consider buy opportunities in trading strategies given its dominant bullish movements.

Machine learning techniques were employed to model relations and predict price movements. 100,000 rows of M1 data with RSI indicator readings were collected. Exploratory data analysis revealed an 83% correlation between falling RSI readings and falling prices, but the RSI had a weak correlation of 0.016 with price levels. The dataset was split for training and validation.

Two neural network classifiers were used: one for predicting price changes and another for RSI changes. The RSI model achieved an ac...
#MQL5 #MT5 #Strategy #AI

Read more...
πŸ‘23❀15πŸ‘Œ7πŸ‘¨β€πŸ’»2πŸ‘1