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
Write articles for the Algo Trading Community and earn 200 USD for each publication

Do you have valuable knowledge to share or an interesting idea to discuss? Join our authors, share your expertise in trading and programming, and get paid for your publications.

In July, experienced algorithmic traders covered a wide range of topics: from the versatile capabilities of the MQL5 language and basic multi-currency strategies to advanced AI technologies and neural networks in trading.

Last month alone, 61 new publications were released in the Articles section, a record achievement. Here are some of the top articles:

▪️S&P 500 Trading Strategy in MQL5 For Beginners
▪️Build Self Optimizing Expert Advisors with MQL5 and Python
▪️Eigenvectors and Eigenvalues: Exploratory Data Analysis in MetaTrader 5

At MetaQuotes, we fully support knowledge sharing among our community members. We believe that the continuous exchange of ideas can help increase the professional expertise of our users and drive progress in the entire algorithmic trading industry.

Become one of our authors: contribute to the growth of the largest algorithmic trading community and monetize your expertise.

Write an article...
👍8761🔥10🏆87👨‍💻4👀3
An advanced guide on integrating Python for MQL5 development is now available. This is essential for enhancing programming capabilities, particularly for financial market analysts and developers.

**Python Overview:**
Python, created by Guido van Rossum in 1991, is a high-level, readable, and simple programming language. It supports various paradigms like object-oriented, procedural, and functional programming, and runs on multiple operating systems such as Windows, MacOS, and Linux. Key features include readability, dynamic typing, and an extensive standard library. Popular libraries for data science, AI, automation, and web development are Pandas, NumPy, SciPy, TensorFlow, Selenium, and Flask.

**Integration Benefits:**
Combining Python with MQL5 offers several advantages:
1. Advanced data manipulation through libraries like Pandas and NumPy
2. Machi...
#MQL5 #MT5 #Python #FinTech

Read more...
👍2220👨‍💻53🤡2👾2👏1
MetaEditor includes a compiler that effectively manages errors detected during profiling. This tool helped uncover why the previous version failed to display risk-reward rectangles correctly. The issue was not with the code but with the look-back candle value set too high at 5,000 bars by default, slowing down the indicator chart window.

To address this, we reduced the look-back period from 5,000 bars to 1,000 bars, significantly decreasing the amount of data to be calculated. We created a standalone script to handle conditions checked by Buffer 6 and Buffer 7. The script draws necessary risk-reward rectangles and places lines with price labels for the entry price, Stop Loss, and Take Profit.

Now, the focus shifts to developing an Expert Advisor based on the refined Trend Constraint Indicator. Using MetaEditor, we write our EA, incorporating MQL5 fun...
#MQL5 #MT5 #MetaTrader #Trading

Read more...
👍3615👨‍💻7👌2👏1
The Restoring Pull Indicator, developed by John Ehlers, is a momentum indicator that provides clear buy and sell signals. As noted in Stocks & Commodities V.11:10 (395-400), this indicator is one of Ehlers’ earliest contributions to technical analysis. The principle is straightforward: when the indicator line turns green, it signals a buying opportunity. Conversely, when the line turns red, it’s time to sell. This tool is particularly useful for traders looking to capitalize on shifts in market momentum. Understanding its application can enhance decision-making in trading strategies.
#MQL5 #MT5 #Trading #Indicators

Read more...
👍594211👨‍💻5👏4
Social insects like honey bees have evolved complex behaviors including communication, nest building, and division of labor, which allow them to thrive in social colonies. One extraordinary ability is their method to locate optimal nectar sources using a "dance" to relay information about the geographical position and nectar quantity. Discovered by Karl von Frisch in the mid-20th century, these insights inspired the development of optimization algorithms.

In 2005, Dervis Karaboga published research on the Artificial Bee Colony (ABC) algorithm. This algorithm simulates the foraging behavior of bees. The model includes scout bees that randomly search new areas and worker bees that exploit known nectar-rich areas.

The algorithm starts with scout bees exploring the space randomly. Upon returning, they share their findings, and worker bee...
#MQL5 #MT5 #ArtificialIntelligence #BeeAlgorithm

Read more...
👍3417🔥3🎉2👌2👨‍💻2
Time Segmented Volume (TSV) is a technical analysis indicator developed by Worden Brothers Inc. TSV segments a stock’s price and volume data according to specific time intervals, allowing for a detailed comparison to highlight periods of accumulation (buying) and distribution (selling). The methodology aims to identify leading market indicators by evaluating different time segments of price and volume metrics. This approach can offer valuable insights when analyzing market trends and investor behavior. Understanding TSV can enhance one's ability to forecast market movements based on detailed time-based segmentation of trading activities.

Source: Worden Brothers Inc.
#MQL4 #MT4 #Forex #Trading

Read more...
36👍23👨‍💻5🎉2💯21
Are you interested in machine learning? Join our multilingual forum where AI enthusiasts discuss neural networks and exchange useful information:

✓ How to use machine learning for trading
✓ AI-powered trading strategies
✓ Best models and best practices for training them
✓ Books and websites related to neural networks
✓ Real trading results obtained using AI robots

Get new ideas and share your expertise in this dedicated thread:

Machine learning in trading: theory, models, practice and algo-trading
👍6827👏7💯7👨‍💻6🔥5
There are innumerable ways AI can enhance trading strategies, yet evaluating each one before adoption is impractical. Let's revisit the strategy of multiple symbol analysis to see how AI can improve it.

Trading strategies with multiple symbol analysis rely on correlations between symbols. Correlation measures linear dependency between variables but does not imply a relationship. For instance, the USDZAR currency pair correlates with oil and gold prices. Understanding these correlations helps gauge risk and guide decisions.

For this analysis, market data from MetaTrader 5 was exported and used to train models with OHLC quotes and a combination of oil and gold prices. Results showed oil having a stronger correlation with USDZAR than gold. Models like linear regression and KNeighborsRegressor performed best, with hyperparameter tuning improving accurac...
#MQL5 #MT5 #AITrading #FinanceAI

Read more...
👍2516👨‍💻4🤯32
Regularization is crucial in machine learning algorithms to enhance the performance of neural networks. It addresses the issue of biasing towards specific parameters, which can hinder network performance on out-of-sample data.

The primary methods of regularization include Lasso (L1), Ridge (L2), Elastic-Net, and Drop-Out. Each method introduces different benefits when correctly paired with activation and loss functions, thus preventing exploding or vanishing gradients.

For classifier networks, L1 regularization (Lasso) is useful as it promotes sparsity. For regressor networks, L2 regularization (Ridge) is favored for balanced weight distribution.

Drop-out regularization is beneficial for deeper networks as it improves generalization by forcing the network to learn redundant representations, making it robust and resilient to noisy data.

When testing o...
#MQL5 #MT5 #RegEx #ML

Read more...
👍234👏3👨‍💻3
Dynamic Time Warping (DTW) offers powerful pattern recognition in financial time series, surpassing traditional methods like Euclidean distance. Originating from speech recognition, DTW aligns sequences with flexible timing, ideal for non-linear financial data.

DTW's strength lies in its ability to account for temporal distortions, enabling identification of unique patterns. The MQL5 implementation focuses on calculating distance scores with customizable step patterns, distance measures, and global constraints, improving alignment accuracy.

Key features include:
- Versatile alignment of sequences with different rhythms.
- Application-specific constraints for meaningful analysis.
- Essential class structures (CStepPattern, CConstraint, Cdtw) for DTW calculations.

This technique provides a robust tool for sophisticated financial market analysis.
#MQL5 #MT5 #trading #fintech

Read more...
16👍15👨‍💻4🔥3🎉1
A notable advancement in trading automation: the same code is compatible with both MT4 and MT5 platforms. This code fetches news automatically from FXStreet servers, allowing for thorough filtering by importance level, currency, and keyword. Key features include filtering news by High, Low, or Medium volatility, currency-specific filtering, keyword-based filtering, and an auto GMT offset check. It also includes a customizable dashboard to display upcoming news, which can be enabled or disabled as required. Additionally, lines indicating upcoming events are displayed on the chart. The code is flexible and can be modified to place trades at specific times related to events or to suspend trading during those periods. Access the MT5 version at the provided link.
#MQL4 #MT4 #FXNews #Forex

Read more...
👍442313👀5👨‍💻4
Discover the power of non-linear methods in financial time series analysis! This article delves into innovative techniques for creating non-linear indicators on MetaTrader 5, transforming linear indicators using logarithmic price transformations to provide robust solutions where linear indicators fall short. Learn to utilize measures like the median and Bayesian smoothing to enhance sensitivity to price changes. Explore practical applications like robust trend analysis with the Weighted Median Ichimoku and improved pattern recognition using ordinal statistics. Ideal for both traders and developers, this comprehensive guide enhances algorithmic trading strategies and indicator accuracy comprehensively.
#MQL5 #MT5 #Trading #Finance

Read more...
👍268👨‍💻6👀6
This indicator offers clear visualization of bid and ask prices, aiding in trade entry and exit decisions. It includes custom bid and ask lines that are labelled for easy identification. Unlabeled lines can cause confusion, making this a useful addition for clarity.

A buy order will execute at the current ask price, while a sell order will execute at the current bid price. Seeing the ask line clearly allows for more strategic buying near the low of a candle rather than the high. Similarly, a labelled bid line assists in selling near the high of a candle, maximizing potential gains. This utility simplifies the trading process and enhances decision-making efficiency.
#MQL5 #MT5 #Trading #Forex

Read more...
👍6923👨‍💻85💔5👏3👌3
Concept:

Continuing from the previous article, the development of the ProgressBar control advances. The control comprises an underlay and a progress bar. Future iterations will support additional design elements on the underlay, such as texts and images. Currently, it exists as a static WinForms object.

Today, programmatic control functionality for the ProgressBar will be developed. This allows usage in applications to indicate progress during extensive operation sequences. Visual effects, such as moving glare, can provide indications of process continuation or completion.

Once complete, the ProgressBar control may remain visible until manually closed, enabling observation of process completion through ongoing visual effects. Multiple progress bars can indicate subprocess completion while the main process continues.

Visual effects will be ...
#MQL5 #MT5 #ProgressBar #UIDevelopment

Read more...
👍4015👌2👨‍💻2👀2
The code in discussion is compatible with the mt4 platform. It automatically retrieves news from FXStreet servers, allowing users to filter by importance level, currency, and keywords. The mt4 version is available at the provided link.

Key features include:
- Filtering news by high, low, or medium volatility.
- Filter by currencies.
- Filter by news keywords.
- Automatic GMT offset check.
- A dashboard to show upcoming news (optional).
- Lines on the chart for all upcoming events.

The code can be easily modified to place trades at specific times before or after events or to halt trading during events.
#MQL5 #MT5 #FXNews #TradingTech

Read more...
👍653264👨‍💻3
Bird Swarm Algorithm (BSA) is a bioinspired evolutionary algorithm developed by Meng and colleagues in 2015. It utilizes swarm intelligence based on social interactions and behavior of bird flocks.

The algorithm integrates three aspects of bird behavior: flight, foraging, and vigilance. Individual birds employ unique strategies, leading to effective cooperation and support in optimizing solutions. Different individuals within the BSA algorithm can switch between these behaviors to balance exploration and exploitation, aiming to avoid premature convergence.

Flight behavior and foraging are dependent on global and individual fitness. BSA models flock behavior, where birds exhibit adaptations such as flocking, communication, adaptability, and leadership-following dynamics to find optimal solutions.

BSA combines these principles for an optimization ap...
#MQL5 #MT5 #birds #optimization

Read more...
👍2718👨‍💻4💯3👏1
This indicator provides alerts on MT4, mobile, and email, enhancing signal management efficiency. Press "N" to generate a new signal, and "D" to delete a signal. Customize your message preferences directly. The MT5 version is available at the provided link for enhanced compatibility.

Stay updated without constant screen monitoring, leveraging advanced alert functionalities. This tool is designed for streamlined communication and better trading decisions. Access the MT5-compatible version to optimize your trading strategy and ensure timely alerts across platforms.

For additional details, visit the link for comprehensive information on functionality and customization options.
#MQL4 #MT4 #trading #alerts

Read more...
48👍406🔥4👏4👌4👨‍💻2
Explore how Multiple Time-Frame Analysis and AI converge in MetaTrader 5. By integrating EURUSD price predictions, this series evaluates the predictive power of AI across various strategies. Data and models built with open, high, low, and close price information revealed that while Linear Regression provided the best benchmark, the Gradient Boosting Regressor (GBR) showed potential after optimization. Despite challenges in achieving superior accuracy, this study illustrates AI's capabilities and provides practical tools and scripts for developers. Implement and visualize AI in your trading strategies with clear guidance on exporting models to ONNX and integrating them into MQL5 Expert Advisors.
#MQL5 #MT5 #AITrading #Investing

Read more...
👍2897🔥4👌4👨‍💻2
Dive into the future of trading with machine learning and predictive analytics, now seamlessly integrated with MetaTrader 5! By leveraging Python’s powerful libraries like scikit-learn and combining them with MQL5, traders can transition from static rule-based systems to dynamic, data-driven models that adapt to market fluctuations.

The step-by-step guide covers gathering historical data, processing it with Jupyter Lab, training a Random Forest model, and deploying it within MQL5 using ONNX for enhanced decision-making. Experience improved prediction accuracy, robust trade execution, and real-time adaptability. This revolutionary approach bridges financial analysis with AI, automating strategies that respond dynamically to market conditions.
#MQL5 #MT5 #MachineLearning #PredictiveAnalytics

Read more...
👍1912🎉5👌42👨‍💻2
Discover invaluable insights into regression analysis for time series trading with our latest guide. We demystify the impacts of non-stationarity on regression models, using Monte Carlo simulations to highlight the pitfalls of spurious correlations. Learn how to leverage MQL5's powerful statistical and graphics libraries for precise calculations. We showcase the correct application of ordinary least squares and matrix algebra to estimate model parameters and how to diagnose model misspecification using residual analysis and auto-correlation functions. Enhance your algorithmic trading strategies by ensuring your regression models meet stationarity requirements for reliable predictions. Perfect for both seasoned and aspiring MetaTrader 5 developers!
#MQL5 #MT5 #Regression #Statistics

Read more...
17👍11👏2👨‍💻2👌1