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
The article presents a streamlined method for traders to automate their trading journal using Google Sheets, reducing errors and saving time. It outlines the creation of a Google Apps Script to facilitate data entry via HTTP POST, allowing real-time updates without manual inputs. The system leverages Google Sheets' collaborative features, making it easily accessible for analysis and feedback among traders. Additionally, it covers reading data from Google Sheets using HTTP, with practical applications in the MetaTrader platform. This setup helps traders focus on improving strategies by automating data handling, providing a robust tool for performance evaluation and enhancement.
#MQL5 #MT5 #Algorithm #Trading

Read more...
πŸ‘42❀20πŸ”₯9✍5πŸ†3πŸ‘¨β€πŸ’»2
An innovative approach involves displaying a candlestick chart without shadows in a subwindow. This unique representation provides a streamlined view, focusing solely on the body of the candles. Accompanying this, the 'Custom Moving Average' indicator is applied both to the main window and the subwindow, showcasing consistent analytical metrics across different chart views. This setup assists in simplifying analysis by emphasizing price movement within the candlestick bodies rather than fluctuations suggested by shadows. It can be useful for those looking to minimize noise and focus on primary price trends.
#MQL5 #MT5 #Indicator #Candlestick

Read more...
πŸ‘29❀13πŸ‘¨β€πŸ’»5🀣3πŸ”₯2πŸŽ‰2
Explore the cutting-edge methodologies in algorithmic trading using Python and MetaTrader 5 tools. This article delves into constructing a machine learning model crafted to refine price forecasting and trading efficiency. The cornerstone lies in feature engineering, from clustering via Gaussian Mixture Models to leveraging XGBoost classifiers for superior accuracy. GridSearchCV optimizes hyperparameters, while model ensembling amplifies classification precision to 73%. A custom Python tester evaluates profitability, accounting for spreads and commissions, ensuring expected market outcomes. This technical exposition provides traders and developers with actionable insights on creating robust, profitable trading models using advanced machine learning techniques.
#MQL5 #MT5 #AITrading #Python

Read more...
πŸ‘18❀9πŸ‘¨β€πŸ’»5πŸ†1
Discover how to leverage Markov Chains to optimize RSI-based trading strategies in MetaTrader 5. This article explores transforming state definitions from moving averages to Relative Strength Indicator (RSI) values, showing how to build custom Markov Chains for adaptive trading rules. Learn how this statistical approach dynamically adjusts based on your market data, offering tailored insights for different assets. By employing a transition matrix, gain a sophisticated understanding of market trends, enhancing decision-making accuracy. Follow along to see the practical development of an MQL5 Expert Advisor and the testing of this probabilistic model against deep learning methods. Ideal for traders and developers seeking advanced algorithmic solutions.
#MQL5 #MT5 #MarkovChain #Algorithm

Read more...
πŸ‘43❀21πŸŽ‰9πŸ‘¨β€πŸ’»5
Auto Profit Closer is an Expert Advisor that automates the process of closing open trades upon reaching a set profit target. It features the parameter "TargetProfit," enabling users to specify the desired profit level. This tool is well-suited for traders aiming to lock in profits without the need for continuous market supervision. It provides greater control over one's trading strategy by ensuring gains are secured effectively. The application is structured to enhance trading efficiency, helping to reduce the emotional stress often associated with manual trading. It streamlines decision-making, offering traders a practical solution for managing trading objectives more effectively.
#MQL4 #MT4 #EA #Trading

Read more...
❀24πŸ‘22πŸ‘¨β€πŸ’»3
The recent discussion illustrates modifications to MQL5 library classes for theme management, enhancing GUI components like CDialog, CEdit, and CButton. Modifying built-in libraries can both improve and negatively impact platform features, so proceed with caution. The integration revolves around theme-switching methods to adjust text, button skin, and background colors.

Incorporating methods into CDialog, CEdit, and CButton facilitates theme adaptability through color definitions and dynamic updates, promoting visually appealing design. The Admin Panel's algorithm was adjusted for seamless theme switching, maintaining efficient functionality.

This exploration serves educational purposes, emphasizing careful execution and testing of modifications to prevent potential issues in trading applications.
#MQL5 #MT5 #ThemeMgmt #MQL5

Read more...
πŸ‘30❀15πŸ‘¨β€πŸ’»3
Exploring optimal time frames for EURUSD prediction, the study assesses model error across 11 frames, revealing minimal error on monthly and hourly frames. An intriguing find is Granger causality between hourly and monthly returns, harnessing a VAR model for prediction. Using MetaTrader 5, the data is fetched and analyzed, focusing on the correlation and error distribution. Advanced techniques like Time Series Warping align time series data, and parameter tuning enhances model accuracy. Implementation in MQL5 allows flexible trading strategies through ONNX-exported AI models, adapting to technical analysis indicators for trade execution on the MetaTrader 5 platform.
#MQL5 #MT5 #AITrading #TimeFrames

Read more...
❀41πŸ‘32⚑6πŸ‘¨β€πŸ’»6πŸŽ‰4πŸ‘2
The Perfect Seconds chart indicator offers a practical solution for transforming live minute candle data into second-based charts. It permits the selection of various seconds durations to close bars precisely, providing live OHLC data that operates seamlessly without the necessity of tick availability. The code is fast and optimized, requiring no external DLLs, making it suitable for VPS environments.

This indicator supports cryptocurrency pairs like Binance and Kucoin, as well as futures and traditional financial instruments including gold and forex pairs. It includes functionalities to manage symbols and rates efficiently. Removal of a specific line of code from OnInit and OnCalculate may be necessary to address operational issues.
#MQL5 #MT5 #Indicator #AlgoTrading

Read more...
πŸ‘29❀7πŸ‘¨β€πŸ’»2
Explore the world of HTTP headers and their crucial role in client-server communication. This article focuses on understanding and implementing headers in HTTP requests and responses. Learn the essential functions of headers like Authentication, Cache Control, and Content-Type specification for secure and efficient data exchange. Discover how MetaTrader 5 automatically manages certain headers and how to customize them. This deep dive includes practical coding examples in MetaTrader 5 for adjusting headers and introduces the development of a class for managing HTTP headers. Enhance your understanding of protocol nuances to optimize algorithmic trading operations.
#MQL5 #MT5 #HTTP #Coding

Read more...
πŸ‘28❀16πŸ‘4πŸ‘¨β€πŸ’»2
Developing a risk manager class involves setting parameters to control trading losses on a daily and total basis. The implementation starts with defining balance-related metrics such as base balance, daily base balance, and daily level. Trading should be suspended when exceeding predefined loss limits, with parameters set as fixed values or percentages. The CVirtualRiskManager class manages this process, handling maximum daily and total loss calculations, and providing methods to update profits and positions safely.

The class ensures that the risk manager's state adjusts to trading conditions and supports programmatic implementation for both manual and algorithmic trading. Additional modifications to existing systems integrate these risk management functions, enhancing overall trading strategy resilience. Testing with model strategy parame...
#MQL5 #MT5 #RiskManagement #TradingStrategy

Read more...
πŸ‘23πŸ‘Œ11⚑6✍2πŸ‘2😁2πŸŽ‰2
The article provides a step-by-step guide to creating an Expert Advisor (EA) in MetaTrader 5 using MQL5, based on the PIRANHA strategy, which leverages Bollinger Bands for market volatility analysis. The PIRANHA strategy is dynamic, designed to exploit market fluctuations by identifying potential entry and exit points. Key to its approach is the use of a 12-period Bollinger Band with a 2-standard deviation setting for efficient price movement tracking. The article details the coding process, focusing on creating indicator handles, initializing data arrays, and incorporating risk management through systematic stop-loss and take-profit settings. This comprehensive guide assists developers and traders in efficient EA development.
#MQL5 #MT5 #EA #BollingerBands

Read more...
πŸ‘30❀12πŸ‘Œ9πŸ‘3πŸ‘¨β€πŸ’»3πŸŽ‰2πŸ†2
We've released MetaTrader 5 platform build 4620, which introduces new MQL5 methods and addresses a number of subtle issues:

- In the terminal, we've fixed errors with tick history requests, where incomplete historical data could be returned in certain cases.
- The search autocomplete function now works correctly and is case-insensitive in all languages.
- Descriptions of new OpenBLAS methods for high-performance computing are now available in the MQL5 documentation.

Read more about the update...
πŸ‘29❀22πŸ”₯11πŸ‘4πŸ‘¨β€πŸ’»2
This tool enhances multi-timeframe chart analysis by allowing you to locate specific candles efficiently. It includes an option to convert server time to local time, displayed as a tooltip. For better navigation, press [Ctrl] or [Shift] while moving the mouse on the chart to reposition the custom crosshair cursor. Key parameters include showing local time, setting the cursor color, and using a unified cursor name synchronized through terminal global variables. This utility is designed to streamline your chart examination process without unnecessary complexities.
#MQL5 #MT5 #Indicator #Cursor

Read more...
πŸ‘18❀9πŸ‘Œ5🀯2πŸŽ‰2πŸ‘¨β€πŸ’»2
When dealing with categorical data in machine learning, nominal variables present challenges due to their lack of inherent numerical ranking. Unlike algorithms that natively handle these types, others, especially linear models, require numerical inputs, making conversion to ordinal variables a necessary step. This process assigns a meaningful order and enhances model interpretability and effectiveness.

Nominal variables, such as price bar types or days of the week, typically lack an inherent order, which can mislead algorithms if not correctly handled. On the other hand, ordinal variables possess a natural order, aiding in capturing underlying relationships. Converting nominal variables to ordinal formats helps in imposing a structured form which improves the model's ability to discern patterns.

Various techniques assist in this conversion to preserve data...
#MQL5 #MT5 #ML #AITrading

Read more...
πŸ‘22❀15πŸ‘¨β€πŸ’»3πŸŽ‰1
The ADX indicator is key for assessing trend strength, using DI+ and DI- to gauge directional momentum. DI+ above DI- suggests possible uptrends, while the opposite indicates downtrends. Parabolic SAR identifies potential reversals, with volume divergence refining signals. A SAR flip with reduced volatility often hints at continuation, while increased volatility confirms trend changes. Using SAR on weekly charts provides broader trend insights, aiding in aligning strategies across timeframes. For precise trade entries, consider both higher and lower timeframe SAR signals. Combining SAR with RSI can filter false signals, enhancing accuracy. Implementing these strategies requires careful coding and testing.
#MQL5 #MT5 #Trading #Indicator

Read more...
πŸ‘23❀11πŸ‘¨β€πŸ’»3
Matrix factorization is a crucial technique for calculations, but improper modeling can lead to inefficiencies and errors. The key is to properly understand how to represent and manipulate matrices in code. Earlier discussions emphasized understanding calculations without focusing on the correct modeling of matrices.

In the previous setup, matrices were specified only by columns, creating confusion. Correct matrix modeling requires recognizing them as dynamic entities, not static arrays, applicable across multiple dimensions. For clarity, matrices should be seen as one-dimensional arrays in a multidimensional space.

Consideration of element ordering in arrays directly affects matrix operation implementations. Element arrangement dictates necessary code transitions. Aligning these orders to computation needs is essential. Enhancing code for larger matrices...
#MQL5 #MT5 #Matrix #Coding

Read more...
πŸ‘28❀16πŸŽ‰5πŸ‘¨β€πŸ’»5
The TimeServerDaylightSavings() function addresses a gap in built-in functionalities, offering server-specific DST information. Complemented by an mqh-file, it includes other time-related server functions, notably determining if brokers implement DST adjustments universally. This methodology stems from statistical analysis of broker quote histories, as outlined in an algorithmic trading guide. By examining weekly opening hours, it identifies GMT offsets to differentiate between standard and daylight-saving times.

Recent updates enhance script accuracy by incorporating a fix for the October 2024 release, mitigating US market DST impacts. This refinement ensures consistent time detection. Notably, Northern and Southern Hemisphere DST adjustments differ, which should be accounted for in global trading strategies.

For optimal results, execute the code on...
#MQL5 #MT5 #Script #AlgoTrading

Read more...
❀15πŸ‘12⚑7πŸ‘¨β€πŸ’»4πŸŽ‰2
The Advantage Actor-Critic (A2C) algorithm efficiently combines Q-learning and policy gradient methods for reinforcement learning models. A2C uses two modelsβ€”Actor and Critic. The Actor decides actions based on policy approximations, allowing for stochastic and adaptive strategies, while the Critic evaluates action choices using Q-learning methods.

This collaboration enables reduction in data variance by training the model with less bias and minimized error. The Critic assesses potential rewards from environments, refining the Actor’s decisions compared to expected outcomes. Implementing A2C doesn't necessitate significant structural changes and can be executed using common neural network architectures for practical deployment.
#MQL5 #MT5 #AI #ReinforcementLearning

Read more...
πŸ‘30❀17πŸ‘¨β€πŸ’»7πŸ‘€6πŸŽ‰3⚑2
A new indicator allows for the visualization of higher timeframe candles on the current working chart. This functionality is demonstrated by overlaying daily (D1) candles on an hourly (H1) timeframe for enhanced analytical insights. It aids traders in identifying longer-term trends while working within shorter timeframes, facilitating more informed decision-making. The transparent overlay of the larger candle provides an immediate context of the larger market movement, assisting in recognizing prevailing trends or potential reversals. This tool can improve strategic planning by maintaining a broader market perspective, even while engaging with short-term data. It enhances the trading interface with clarity and utility.
#MQL4 #MT4 #Indicator #Strategy

Read more...
πŸ‘36❀25πŸ†3πŸŽ‰2πŸ‘Œ2πŸ‘¨β€πŸ’»2✍1
Swarm intelligence, initially conceptualized in StanisΕ‚aw Lem's novel "The Invincible," serves as a foundational idea in algorithmic optimization. This concept is characterized by systems operating without centralized control. The Particle Swarm Optimization (PSO) algorithm, inspired by this notion, models optimization tasks by simulating the behaviors of autonomous particles within a swarm environment. Each particle aims to reach the optimal solution through position and velocity updates, leveraging both individual and collective knowledge about the problem space. The algorithm has demonstrated efficacy in optimizing complex, continuous functions, but faces challenges with discrete functions unless adapted accordingly. Stay current with developments in swarm-based algorithms for enhanced optimization techniques.
#MQL5 #MT5 #Algorithm #AI

Read more...
πŸ‘33❀28πŸ‘¨β€πŸ’»7πŸ‘Œ5
The Expert Advisor (EA) operates based on signals generated by the custom indicator "WPR Custom Cloud." It signals a 'BUY' position when the indicator exits the lower zone and a 'SELL' position when it exits the upper zone. The EA evaluates signals only at the birth of a new bar. Traditional risk management tools such as 'Stop loss', 'Take profit', or 'Trailing Stop' are not incorporated in this EA. Positions are closed when an opposite signal is detected, ensuring that trades remain in alignment with the dynamic signals provided by the "WPR Custom Cloud" indicator. This approach prioritizes adherence to indicator-based strategies over fixed profit or loss parameters.
#MQL5 #MT5 #EA #Indicator

Read more...
❀30πŸ‘21⚑7πŸ‘¨β€πŸ’»4πŸ‘€4πŸ‘Œ3