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
Artificial Intelligence and Neural Networks

Artificial intelligence and neural networks are often a subject of fascination. However, their core is not as mysterious as perceived. A neural network is a thoughtfully designed program that aims to achieve specific goals. Understanding this requires examining the algorithms and mathematical equations such as linear regression used in these networks.

Linear regression is an affine function, essential for neural network development. When constructing a neural network, it’s crucial to find values that best fit the data set, thus simplifying computation and optimizing performance.

In these articles, the focus will be on demonstrating these processes using MQL5 exclusively. This approach will illustrate that the right understanding and method can be applied across various programming languages, showcasing the c...
#MQL5 #MT5 #AI #NeuralNetwork

Read more...
πŸ‘27❀12πŸ‘¨β€πŸ’»5πŸ‘2
Algorithmic trading strategies enable quick, informed decisions, minimizing human error and emotional biases. Automated systems like MetaTrader 5 offer consistency by following predetermined parameters. Creating an Expert Advisor (EA) utilizing the Parabolic SAR indicator can successfully automate trade execution.

The Parabolic SAR tracks potential market trend reversals, using dots on a chart. Sensitivity is controlled by SAR Step and Maximum settings, aiding traders in identifying entry and exit points. This strategy excels in trending markets such as forex and commodities.

Implementation in MQL5 involves defining input parameters such as LotSize, SAR_Step, and SAR_Maximum, and handling trade operations through the Trade.mqh library. With properly tuned parameters, the strategy shows promise but requires continuous monitoring and optimization to ens...
#MQL5 #MT5 #AlgoTrading #Forex

Read more...
πŸ‘34❀17πŸ‘¨β€πŸ’»5✍1πŸ‘1
To analyze trading signal performance:

1. Access the provided URL.
2. Select a signal of interest.
3. Navigate to the Trading History tab.
4. Scroll to the bottom and select the History link.
5. Open your MT4 terminal and go to File > Open Data Folder.
6. Place the CSV file downloaded in step 4 into the MQL4\Files directory.
7. Input the file name (without the .csv extension) into the FILENAME field when loading the script.

This workflow enables efficient review and assessment of trading history, facilitating better decision-making based on historical data.
#MQL4 #MT4 #trading #forex

Read more...
πŸ‘34❀21πŸ‘¨β€πŸ’»4⚑3πŸŽ‰1
Markov chains are effective for modeling and forecasting time series data in finance. Their simplicity is a primary advantage, relying on probabilistic models without complex assumptions. They are beneficial for financial data, which often exhibit non-stationary behavior.

There are four main types of Markov chain models: discrete-time, continuous-time, Hidden Markov models, and Switching Markov models. The primary types are discrete-time, modeling a system over discrete steps, and continuous-time, modeling over an interval. Probability estimation, often via expectation maximisation, is key for using these models.

Markov chains predict future states based on current status and transition probabilities, making them suitable for various fields like finance, weather, and biology.
#MQL5 #MT5 #finance #forecasting

Read more...
❀37πŸ‘30πŸ”₯6πŸ‘¨β€πŸ’»6πŸŽ‰4
To use the script effectively on a Daily timeframe, review the results on both the D1 and M1 charts. Although the script wasn't initially designed to calculate support and resistance lines, it appears capable of doing so.

Key inputs:
- `Prediction_Bar >= -1`: 0 refers to the current bar, -1 to the next bar, +1 to the previous bar, and so on.
- `Win > 0`: Represents the length of the comparison window for stream similarity.
- `Num > 0`: Indicates the number of illustrated bars.

Color indicators:
- Aqua: The best match stream (shifted).
- DarkOrange: Bar close.
- Lime: Predicted bar.
- Red: Bar high.
- Blue: Bar low.
- Yellow: Predicted area.

Bar text indicates the similarity error for further analysis. The script's flexibility provides potential additional applications beyond its original scope.
#MQL5 #MT5 #trading #forex

Read more...
❀28πŸ‘18⚑6πŸ‘¨β€πŸ’»4😁1
Enhancing Tooltip and ProgressBar Controls in MQL5

Concept:
The aim is to refine the ToolTip control to function more like MS Visual Studio by introducing smooth appearance and disappearance behaviors. This requires implementing timers for graphical elements, using a list of active objects to track items needing timer processing. This approach supports animated interfaces with interactive visual effects. For this work, a timer event handler will be created for ToolTip and later for ProgressBar control.

Improvements:
1. Adding timer parameters for graphical elements on canvas.
2. Default values for ProgressBar control; adding progress line glare effect similar to Windows.
3. Describing control states and animation sequences for ToolTip.
4. Updated object property lists for enhanced sorting and selection.
5. Improved pointer handling and pause countdown meth...
#MQL5 #MT5 #Code #Library

Read more...
πŸ‘43❀30⚑5πŸ‘€5🀑4✍1πŸ‘1
Introducing a comprehensive indicator for plotting key Pivot Points: "Classic," "Camarilla," "Woodie," "Floor," "Fibonacci," and "Fibonacci Retracement." Users can select various timeframes for pivot calculation, offering flexibility in analysis. The tool allows for customization in width, color, and style, enhancing visual clarity. Additionally, the indicator supports multiple pivots with different timeframes on a single chart, providing a layered view of market levels. This all-inclusive approach aids in more robust technical analysis and decision-making processes.
#MQL5 #MT5 #PivotPoints #TradingIndicator

Read more...
πŸ‘33❀11πŸ‘¨β€πŸ’»5πŸ‘Œ1
Discover the power of alternative data with our latest analysis, focusing on VISA's Spending Momentum Index (SMI) as a predictor for EURUSD price movements. Delve into the utilization of a deep neural network to process intricate datasets and unlock potential market insights. Our robust methodology includes leveraging the FRED API for diverse economic data, optimizing neural network parameters, and employing feature selection to enhance model reliability. We highlight practical steps for integrating this approach within MetaTrader 5 using MQL5, and ensuring scalable implementation via ONNX format for seamless machine learning deployment. A must-read for enhancing your trading strategies!
#MQL5 #MT5 #AlternativeData #TradingAI

Read more...
πŸ‘28❀8πŸ”₯5πŸ‘¨β€πŸ’»3😱1πŸŽ‰1
Explore the fundamentals of matrix calculations in programming and enhance your coding expertise with MQL5. Understanding the power of matrices can simplify complex computations, especially useful in 3D transformations and graphical applications. This article breaks down matrix implementation in code versus traditional scalar methods, empowering developers to handle large data efficiently. Learn how to rotate and manipulate objects through concise matrix operations, providing a streamlined approach to algorithmic trading and beyond. Enhance your programming skillset, making your code faster, simpler, and more efficient with practical matrix applications. Dive into the detailed guide for hands-on learning.
#MQL5 #MT5 #programming #matrices

Read more...
πŸ‘42❀23πŸ‘¨β€πŸ’»7πŸ‘5πŸ‘Œ2πŸ†1
To acquire historical data in MetaTrader 5, the typical procedure involves using the "View > Symbols > Request" tool. However, this method occasionally omits certain data points that are present on the chart. An alternative solution is provided by a script that exports all available historical data to a CSV file. This file is located within the "Files" folder inside the "Common Data Path" directory. It is crucial to ensure that "Max bars in chart" is set to "Unlimited" under 'Tools > Options > Charts' to capture comprehensive data. This adjustment is necessary for the script to function effectively.
#MQL5 #MT5 #historicaldata #tradingtips

Read more...
πŸ‘23❀8⚑4πŸ‘Œ4πŸ€”3πŸ‘¨β€πŸ’»1
Brain Storm Optimization (BSO) is a population optimization algorithm inspired by brainstorming. It leverages collective intelligence to solve complex problems, making it suitable for multimodal optimization.

BSO addresses limitations of existing methods like niching and clustering, which require pre-determining the number of subpopulations. Instead, BSO dynamically transforms and clusters the search space, seeking multiple meaningful solutions.

BSO was developed by Shi et al. in 2015, with various versions like Hypo Variance and Global-best. Clustering, convergence, divergence, selection, and mutation steps are integral parts of BSO. The algorithm simulates brainstorming, generating new solutions by combining and modifying existing ones.

K-means clustering is used to group solutions, optimizing the search efficiency. This structured approach o...
#MQL5 #MT5 #algorithm #optimization

Read more...
πŸ‘23❀11πŸ‘¨β€πŸ’»2⚑1πŸ‘1
Discover the advancements in our replay system for MetaTrader 5. In this article, we delve into the creation of a new class, C_AdjustTemplate, to improve data modeling efficiency and streamline code execution.

We tackle the issues from the previous iteration by reducing repetitive setup calls and optimizing template manipulation. The C_AdjustTemplate class simplifies data handling by acting as a template file, making it easier to adjust and customize chart trades.

By reworking the C_ChartFloatingRAD class, we’ve enhanced functionality without increasing complexity. Perfect for traders and developers, this update ensures a more robust and efficient trading experience. Explore how these improvements can optimize your algorithmic trading strategies.
#MQL5 #MT5 #MetaTrader #CodingTips

Read more...
πŸ‘50❀27πŸ‘¨β€πŸ’»6πŸ‘3
This code offers a custom order panel compatible with both MT5 and MT4 platforms. Although the provided source is tailored for MT5, it can be adapted for MT4 with minimal changes. It's recommended to compile the MT4 version using the Controls library from MT5 for better efficiency.

Some issues related to template handling will necessitate minor adjustments in the standard Controls library, which are not included in this package. Additionally, note that the original program icon is missing.

For developers seeking to tailor the order panel to specific needs, this source code provides a flexible foundation. Adjust the Controls library as required to optimize template handling and enhance functionality on either platform.
#MQL5 #MT5 #trading #forex

Read more...
πŸ‘36❀10πŸ‘¨β€πŸ’»3πŸ‘2
Support Vector Regression (SVR) is a type of regression derived from Support Vector Machines. It utilizes kernel methods to map input data into higher-dimensional spaces, capturing complex relationships, unlike dimensionality reduction.

When applied to multi-layer perceptrons, SVR's loss function is pivotal. Differences between SVR and Gaussian Process Regression (GPR) are crucial. GPR projects mean with confidence intervals, suitable for uncertain or luxury product forecasts. SVR, robust to noise, works best with stable, everyday consumer goods as it minimizes the influence of outliers.

Class implementation for SVR in MQL5 involves the loss function focused on training rather than projections with kernels. Key parameters include the L2-Norm of weight matrices, regularization parameter, and epsilon margin.

Applications extend to custom signal and trailing stop c...
#MQL5 #MT5 #ML #AI

Read more...
❀50πŸ‘29😁5πŸ†4⚑2πŸ‘2πŸ‘¨β€πŸ’»1
The MCDx Smart Money indicator is essentially an advanced application of the Relative Strength Index (RSI). Here's a concise breakdown of its functionality:

1. The indicator starts by obtaining the RSI value for the specified period.
2. This RSI value is then adjusted by subtracting a predefined base value.
3. The result is further calibrated by multiplying it with a sensitivity factor.
4. The final value is constrained within a range of 0 to 20. Any result above 20 is capped at 20, while any result below 0 is set to 0.

This approach simplifies interpretations by providing a controlled range of values, enhancing the precision of signals.
#MQL4 #MT4 #trading #indicator

Read more...
❀30πŸ‘19⚑2πŸ‘¨β€πŸ’»2🀯1
Testing and optimizing a trading algorithm requires using MQL5's Strategy Tester to backtest the Expert Advisor (EA) against historical data. This article provides insights into interpreting various performance metrics such as profit factor, drawdown, win rate, etc., which indicate the algorithm's reliability and profitability.

A rapid-fire trading strategy profits from quick market movements by executing multiple trades in a short time frame. This approach contrasts with traditional strategies targeting longer-term trends. Automated systems like Expert Advisors are crucial for executing these trades efficiently.

Essential technical indicators for this strategy include the Parabolic SAR and Simple Moving Average (SMA). The Parabolic SAR identifies potential reversals, while the SMA smooths out price data and highlights trend directions.

Implementation in ...
#MQL5 #MT5 #trading #algo

Read more...
πŸ‘16❀11πŸ‘¨β€πŸ’»7⚑1πŸ”₯1πŸ‘Œ1
In the continuation of a MetaTrader 5 Chart Trade project, the article delves into refining user interaction and functionality. By incorporating incremental changes to the Chart Trade indicator, the article emphasizes a macro to standardize error messages, ensuring robust error handling and enhanced security measures. The highlight is the implementation of the C_ChartFloatingRAD class, which optimizes the editability of chart values without clutter. Through meticulous procedural explanations, it shows how to maintain data integrity during timeframe switches and leverage global terminal variables for seamless state management. This approach enhances usability and reliability for algorithmic traders and developers.
#MQL5 #MT5 #Charting #Trading

Read more...
❀12πŸ‘12πŸŽ‰1πŸ‘¨β€πŸ’»1
Discover how AI transforms trading strategies in MetaTrader 5! This article highlights creating new trading strategies using AI to predict the closing price of USDJPY. It explains how fixed income securities, particularly Government Bonds, impact currency valuation and trading strategies. When comparing models, Linear Regression performed best, yet Linear Support Vector Regressor (LSVR) was found most effective after hyperparameter tuning. Comprehensive data analysis and validation techniques ensured accuracy without overfitting. Exported to ONNX, these models enhance automated trading systems. Learn the steps from data fetching to model integrationβ€”perfect for developers and algorithmic traders aiming for precision.
#MQL5 #MT5 #AI #trading

Read more...
πŸ‘18❀14πŸ‘Œ3⚑1πŸ‘¨β€πŸ’»1πŸ‘€1
Causality Network Analysis (CNA) is an advanced tool for modeling causal relationships between variables. In financial markets, CNA helps identify how market events influence each other, leading to better predictions.

Causal discovery infers relationships from data. For financial markets, it means pinpointing which factors, like economic indicators or market prices, affect others. The Fast Causal Inference (FCI) algorithm is often used for this purpose.

Network analysis represents relationships between financial instruments. This involves setting up a network structure to analyze these connections. Event prediction uses models like Vector Autoregression (VAR) for forecasting. The combination of CNA and VAR offers a comprehensive approach to market analysis.
#MQL5 #MT5 #Causality #Trading

Read more...
πŸ‘19❀12πŸ€”2πŸ‘1😁1πŸ‘¨β€πŸ’»1
In the initial article, an Expert Advisor (EA) was developed with two trading strategy instances. This increased to nine instances in the second article and 32 in the third. Testing times remained manageable. A shorter single test pass is preferred, but overall optimization should still be completed within hours, not days. A single pass should finish in seconds or minutes for combined instances. Multiple strategy instances increase optimization time.

For the experiment, a new EA based on the existing OptGroupExpert.mq5 was created with necessary code changes and saved as BenchmarkInstancesExpert.mq5. Runs were conducted in different tick simulation modes, doubling instances from 8 to 16,384. Memory usage and simulation times were analyzed. Results indicated reasonable memory consumption and simulation times, with the highest number of instances...
#MQL5 #MT5 #ExpertAdvisor #Backtesting

Read more...
❀26πŸ‘25πŸ‘3πŸ‘¨β€πŸ’»1