MQL5 Algo Trading
389K subscribers
2.57K photos
2.57K 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
In the latest review of genetic algorithms, insight is provided into the diverse methods used to represent features in optimization problems, highlighting real and binary data representations, each with distinct benefits for use in genetic algorithms. It elaborates on how real numbers, often encoded using standards like IEEE 754, facilitate a direct approach to encoding solutions for optimization tasks, allowing for a wide range of continuous values to be handled effectively. Conversely, binary representations play a crucial role in uniting multidimensional aspects of an optimization challenge into a cohesive search landscape, simplifying operations like mutation due to their straightforward elementary nature.

Moreover, the discussion introduces the Gray binary code as a strategic enhancement over traditional binary encoding, mitigating issues related to large bit variations between ...

Read more...
πŸ‘8πŸ”₯2πŸ‘1
Bollinger Bands are a widely utilized indicator in trading, and this variation builds upon the standard model by incorporating a linear weighted average alongside weighted deviation. This advanced version adjusts for the changes in price data more dynamically, potentially providing traders with a more sensitive means to gauge market volatility compared to the simple moving average used in traditional Bollinger Bands.

Traders are advised to utilize this modified indicator similarly to the original Bollinger Bands. It serves as a tool to assess market conditions, identify potential overbought or oversold states, and pinpoint possible price breakout points. Proper understanding and application of this tool can enhance trading strategies significantly.

Read more...
πŸ”₯5πŸ‘1πŸ‘1πŸ€“1
Explore tens of thousands of trading apps on the Market.

Find robots to automate your trades, indicators for analyzing quotes and identifying trends, and other applications to make your trading more informed, effective, and convenient.

Purchases are completely safe. Moreover, before you pay, you can run a demo version of the product and test it in the strategy tester.

Go to Market
πŸ‘11❀1πŸ”₯1πŸ‘1🀩1
Understanding the intricacies of developing an expert advisor based on the Fair Value Gap (FVG) strategy is fundamental for traders looking to enhance their algorithmic trading tools. This discussion delves into creating an expert advisor that leverages the imbalance and Smart Money concepts to optimize trading outcomes in volatile markets. By utilizing MetaQuotes Language 5 (MQL5) within the MetaTrader 5 (MT5) trading platform, traders can build robust trading systems tailored to identify and exploit market imbalances depicted through Fair Value Gaps.

The approach starts by defining what a Fair Value Gap is - a price gap that occurs due to significant imbalances between buying and selling pressures, often highlighted by long directional candlesticks. This strategy not only involves analyzing market dynamics through candlestick patterns but also requires a solid understanding of mark...

Read more...
πŸ‘6πŸ‘4
Triangular arbitrage in Forex and cryptocurrencies is a strategy that exploits discrepancies between three currencies to make a risk-free profit. The technique operates on the principle that the product of three exchange rates should logically equal one, but due to market inefficiencies, this isn't always true, creating opportunities for arbitrage.

The recent integration of deep learning models into triangular arbitrage strategies enhances the ability to predict and capitalize on these market inefficiencies more effectively. For instance, using ONNX models with Python allows traders to implement these strategies on platforms like MT5. This method requires an initial setup including the installation of Python and Visual Studio Code, followed by specific libraries essential for running the predictive models.

The application, detailed through a provided expert advisor (EA), demonstrate...

Read more...
πŸ‘Œ4πŸ”₯2πŸ‘1
Offline Reinforcement Learning (ORL) provides a pathway for training models using pre-collected environmental interaction data, significantly optimizing environmental interaction during training phases. This methodology leverages data from various agents to train models comprehensively. However, ORL uses a static dataset which may not fully represent environmental diversity, potentially leading the model to operate outside of the data distribution without appropriate environmental feedback or adequate evaluations from the Critic.

Addressing this issue, the Supported Policy Optimization (SPOT) method incorporates a Variational AutoEncoder (VAE) to enhance policy regularization. This approach adheres strictly to the data distribution by adjusting policy operations within the distribution constraints established by the training dataset. SPOT has demonstrated superior performance over co...

Read more...
πŸ‘7πŸ‘1πŸ‘¨β€πŸ’»1
The Weighted Deviation indicator presents an advanced method for assessing market volatility, employing a linear weighting process at every calculation stage. This new technique differentiates itself by integrating linear weights consistently, unlike the typical deviation calculations which may not always do so, particularly when a linear weighted moving average is applied in the moving average methodology. Its responsiveness surpasses that of the standard deviation, making it a robust tool for traders who seek to gauge volatility with greater precision. The Weighted Deviation can be utilized in the same manner as other deviation indicators, enhancing trading strategies by providing a clearer understanding of market dynamics.

Read more...
πŸ‘5πŸ‘1
If you haven't found the perfect trading app, order a custom solution on the Freelance. Professional developers can bring your idea to life quickly and efficiently.

Simply create the technical specifications, set your budget, and choose a developer based on their profile and ratings. All payments are completely secure, protecting both parties from fraud.

Are you an experienced MQL5 programmer confident in your skills? Register easily, verify your identity, and start applying for jobs to earn from your expertise.

Go to Freelance
πŸ‘9❀3πŸ‘2🀩1
Understanding the application of Symbolic Regression (SR) within the MQL5 framework offers valuable insights, particularly for those interested in automated trading strategies. SR, unlike classical regression that begins with assumptions about data relationships, commences with a random configuration of expression trees. This aspect enhances its adaptability to new market data and flexibility in capturing complex relationships through genetic optimization.

SR's capability to use an expression tree format allows for a more controlled manipulation of the training data to develop comprehensive models that deeply resonate with underlying market dynamics. In stark contrast to linear models that presume direct relationships, SR facilitates a non-linear approach to understanding data correlations, thus broadening the scope of analysis beyond traditional methods.

This technique is particula...

Read more...
πŸ‘9❀3✍1πŸ‘1
Understanding the Binary Genetic Algorithm (BGA)

Recently, a deeper look into the binary genetic algorithm (BGA) and its foundational elements has enriched the understanding of how this optimization method functions. BGA operates under evolutionary algorithm principles characterized predominantly by selection, mutation, and crossover to optimize solutions.

Key Aspects:
- BGA is derived from evolutionary algorithms and utilizes binary data representation.
- All solutions translate into binary strings, ensuring straightforward operations on genetic components like crossover and mutation.
- The fitness of each solution is assessed, followed by selective breeding to generate new solution populations, continuously advancing toward optimal solutions.

The seminal work in BGA by John Holland in 1975 catalyzed its development, integrating concepts of natural evolution and genetics. Today, B...

Read more...
πŸ‘8πŸ‘2❀1
In instances where several trades consecutively result in losses, it may be prudent to temporarily halt trading activities. This pause allows for an assessment of whether the losses are due to market choppiness or extreme volatility, which are conditions that typically do not favor usual trading strategies. Recognizing these conditions early and adapting strategy accordingly is essential for maintaining trading efficacy and minimizing risk.

Read more...
πŸ‘7πŸ‘2
In automated Forex trading, bridging multiple EAs (Expert Advisors) to operate seamlessly on a single terminal poses notable challenges, primarily due to the complexity of ensuring their stable interaction. Instead of discarding efficient but incompatible strategies, a systematic approach using object-oriented programming, specifically in MQL5, can be employed for integration.

This method involves distilling each strategy into a set of clear, executable rules that govern trade timings, volume, and order types based on dynamic market data analysis, such as tick volumes, to detect peaks in trading activity. The introduction of parameters for order thresholds and management of drawdown limits ensures that each strategy adheres to predetermined risk levels, thereby optimizing the deployment of the starting capital across various strategies.

For practical implementation, the code is str...

Read more...
πŸ‘4❀2πŸ‘2πŸ†1πŸ‘¨β€πŸ’»1
In MT5, the function to obtain the commission for an active position provides users with an efficient approach to track their trading costs. This function outputs the commission values of all active orders, simplifying the process of financial analysis for traders. By implementing this functionality, traders can access real-time data on transaction fees, aiding in the management of their trading strategies. This is crucial for maintaining transparency and optimizing trading performance in the dynamic market environment.

Read more...
πŸ‘6πŸ‘2⚑1
Continuing the discussion on multi-symbol multi-period indicators, this article focuses on enhancing the multi-indicator class to effectively integrate arrow indicators. Arrow indicators, unlike standard ones, do not consistently provide data across all drawing buffers; they only display data (often as EMPTY_VALUE) where the arrow is visible, and empty otherwise.

This characteristic necessitates a refined approach when integrating these indicators into a higher timeframe chartβ€”to avoid overriding actual data points with empty values from a lower timeframe. For instance, when merging M5 chart indicators onto an M15 chart, it’s crucial to selectively transfer non-empty values, ensuring that previously plotted arrows remain intact and visible.

The article proceeds to discuss the technical adaptations required for multi-indicator classes to handle data gaps inherent in arrow indicators....

Read more...
✍5πŸ‘2πŸ‘2
Identifying trend changes in financial markets is integral for traders to adapt to evolving conditions and capitalize on emerging opportunities. This discussion investigates various technical analysis tools, like moving averages, candlestick patterns, trendlines, and support and resistance levels, to detect potential trend reversals.

Utilizing moving averages, traders can observe crossovers which may signal a significant trend shift. Candlestick patterns, with their historical reliability, offer insights into market sentiment changes. Moreover, trendlines drawn on charts help in visualizing trend continuity and potential reversals.

Additionally, support and resistance levels provide clear markers that, when breached, suggest changes in market trends. All these methods are further enhanced by programming capabilities of MQL5, which allows for integration into trading systems to autom...

Read more...
πŸ‘6❀1πŸ‘1
Understanding the validity of relationships in machine learning model inputs and the predicted variables is essential in the realm of algorithmic trading. To achieve meaningful predictions, the relationships within the data must be real and not just statistically coincidental. This discussion highlights the importance of employing unit root tests on model residuals to check for spurious regressions - models that falsely indicate meaningful relationships due to coincidental statistical errors rather than genuine interdependencies.

Such models can misleadingly show low error metrics, giving a false sense of accuracy and potentially leading to costly mistakes in trading strategies. The text discusses generating synthetic time series data to illustrate how spurious regressions can occur and provides insights into identifying and mitigating them using statistical tests like the Augmented ...

Read more...
✍4πŸ‘3πŸ‘Œ2πŸ”₯1
A new script has been developed that facilitates the conversion of historical data across multiple trading timeframes including M1, M5, M15, M30, H1, H4, D1, W1, and MN. The process begins by downloading or importing your historical data.

Once data is imported, it is essential to close all charts and restart the MT4 platform. From there, users must navigate through the menu to File -> Open Offline and open an offline chart of the target symbol in M1, which should be marked in grey.

The script, named "period_converter_all_kai," can then be executed from the script folder. Users will need to input a "Start Date" and press OK, then wait for a confirmation message indicating the successful conversion. Restarting the MT4 platform will allow users to access and verify the data across all desired timeframes.

For users seeking a more detailed walkthrough of this process, complete with visu...

Read more...
πŸ‘9πŸ‘4❀1
In our ongoing development of a manual EA, previously discussed, we have introduced considerations for moving towards a universal EA model. The creation of the C_Manager class marks a strategic updateβ€”it functions as an intermediary layer between the EA and the order system, enhancing security and controlling functions. This class acts as an administrative point, increasing reliability by managing essential operations independently, based on predefined parameters.

The transition introduces a structured approach where the EA accesses order functions through C_Manager, which performs operations under strict conditions to reduce error risks. This means actual trading decisions and operations, like opening market positions, become more streamlined and secure.

Additionally, different account typesβ€”NETTING and HEDGINGβ€”play critical roles in automatic EA functionality. Each account type ha...

Read more...
πŸ‘7❀1πŸ‘1πŸ‘Œ1
Understanding the DD_Relative function in trading software is crucial for monitoring the financial health of a trading account. This function calculates the relative drawdown of the account by determining the current net profit or loss of all open positions. This is achieved through the Current_LossOrProfit() function, which aggregates these values. The net figure is then divided by the account's current balance, sourced from AccountInfoDouble(ACCOUNT_BALANCE), to determine the drawdown as a percentage.

The percentage result is refined to two decimal places using NormalizeDouble(), and displayed on the trading chart via the Comment() function. Additionally, the Current_LossOrProfit() function plays a key role by sifting through each open position, checking its alignment with specific criteria such as matching magic numbers and symbols relative to the chart in focus. It then incorpora...

Read more...
πŸ‘6πŸ‘3❀1
Neural networks, while complex, offer a broad range of applications once mastered. The shift in focus from feature design to architecture, loss function, and optimization design represents a move towards higher abstraction in machine learning tasks. This transformation underscores the need for depth in understanding the intricacies involved in neural network implementation, particularly when applied to fields such as algorithmic trading.

Understanding the components and functioning of neural networks is crucial. Neural networks, inspired by biological neural networks, operate through a structured network of layers comprising interconnected nodes. This structure allows them to identify complex patterns in data, often requiring thorough analysis and careful management of the scaling and preprocessing of input data to ensure model accuracy.

Especially in trading applications, incorpora...

Read more...
πŸ‘10πŸ‘1