MQL5 Algo Trading
393K subscribers
2.59K photos
2.59K 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 realm of technical development, a useful function exists. This function translates the (x, y) pixel value into the corresponding price visible on the Y-axis. The function is activated via an OnChartEvent click interaction.

The above method makes it simpler to map pixel values to actual values on the chart. It gives the developers the power to convert pixel values into real price values using a single click. The ease and precision of this method enable developers to create more accurate and faster applications.

It is essential to understand that this function opens up a new perspective in analyzing and computing data, moving a step forward in the complex world of technology. This innovation gives developers a new tool to work with while creating applications that require charting capabilities.

In conclusion, the realm of technical development continues to evolve, bringing for...

Read more...
❀4πŸ‘3
In the latest update for the MetaTrader 5 trading terminal, a new order filling policy - Passive/Book or Cancel - has been implemented, and MQL5 has added new runtime error codes. In this post, we'll discuss how these additions will be integrated into the library.

Since the update, the library's example files and articles have ceased to compile due to inaccessibility of private methods from derived classes in the CTrading class. To solve this, private methods will be moved into a protected section, making them available in the inherited class.

This update also introduces descriptions of the new order execution policy and runtime error codes into the library's arrays of text messages. Note that newly implemented error codes in MQL5, from 4020 to 4025, will be added to the runtime error messages array.

The CMessage class is now capable of displaying library messages stored in mess...

Read more...
πŸ‘2❀1
Introducing Multi_BreakEven, a refined script file intended for setting multiple entry positions to breakeven. This functionality enhances trading strategies by allowing the positioning of trades at breakeven when the market moves in a favorable direction.

A crucial part of any trading strategy is the preservation of the initial investment and Multi_BreakEven facilitates this by ensuring trades either meet their profit target or exit at the breakeven point. The option of employing the Pips method, set by default at 100 points for a 5-digit broker, provides a straightforward approach to attaining breakeven.

Alternatively, a trader can opt for the target price method, another technique for achieving breakeven. It's essential to note the exclusivity of each method. Namely, the activation of the pips method makes the target price method inactive, and the same rule applies in reverse. Th...

Read more...
πŸ‘1
Introducing the feature Multi_BreakEven on our platform: a tool that adds versatility to trading strategies by enabling multiple entry positions to reach breakeven when a trade turns in their favor. This functionality is designed to guard investments by providing an either/or scenario - either the trade meets the profit goal, or the system exits at the breakeven point.

Two methodologies are available with this component: the 'Pips' method, which is set as a default preference at 100 points for a 5-digit broker, and the 'Target Price' method. Both methods are distinct and using one results in the other becoming inactive. The selection of either the Pips or Target Price method is dependent on the trader's strategy, furnishing flexibility for implementing calculated trading decisions.

Remember, careful decision-making enhances the potential for profitable trading. Be informed, remain p...

Read more...
πŸ‘3
The transformation of traded tickets into bars has been a key aspect of the system insofar. This involved converting traded tickets into 1-minute bars on the MetaTrader 5 platform, using real data. However, the task at hand is more complex - bar conversion into tickets for simulation purposes.

Bar conversion may sound straightforward, but it requires a deep understanding of how tickets behave for a 1-minute bar. To achieve a real-life-like visualization, it’s necessary to create a movement that mirrors the real one as closely as possible. The process involves creating an 'inner zigzag' with a minimum of 9 movements, always starting at the bar opening and ending at the close.

The system is set to handle just the replay/simulation and does not have to respect the length of a 1-minute bar, a strategy employed by MetaTrader 5 for its tester. The objective here is to treat 1-minute bar...

Read more...
πŸ‘3
The latest indicator, a derivative of the Heiken Ashi, sees its origin in the MetaQuotes publication. Crafted to enhance precision in statistical analytics, this tool works to provide insightful data and detailed pattern detection. With the Heiken Ashi's robust foundation, the new indicator aims to offer a more advantageous analysis environment for developers. Explore the intricacies of the data universe with the new indicator from MetaQuotes. Crucial parameters help to ensure enhanced accuracy in market trends and behaviour analysis. Experience superior data perception with this cutting-edge technological tool.

Read more...
πŸ‘1
Introducing the "wd.Range_DailyAvg.mq5", a new MT5 custom indicator developed with inspiration from MT4's 'TSR_Ranges.mq4' by Ogeimais. This powerful tool employs a 20-day historical spectrum of upper and lower prices, aiming to delineate the Average Daily Range (ADR) with precision.

The indicator's objective is twofold: projecting potential monetary conduits for the day based on past price tangents and assisting traders in pinpointing potential profit opportunities. The workings of the indicator are bifurcated into a series of input parameters.

The first control permits the display of Average Range Information, specifically in the upper left chart region. The second control users are granted is over the color symbolizing the projected price region for the day. Moreover, the rectangle outline representing this area can be custom-styled by users in terms of width and style.

Another ...

Read more...
πŸ‘4
Support Vector Machine algorithms are a potent option for technical tasks such as linear or nonlinear classification, regression, and even outlier detection. SVMs distinguish themselves by deploying sophisticated mathematical operations, diverging from logistic regression or Bayesian classification techniques which typically adopt simpler models. The objective? An optimal hyperplane that distinguishes data in an N-dimensional space, ideal for classification tasks.

The SVM, in essence, seeks to discover a hyperplane that maintains the maximum margin and minimizes classification error. The hyperplane's basic properties include its dimensionality, equation, margin, separation capabilities, and classification utility. Once the hyperplane is identified, it serves as the line of demarcation, accurately classifying new data points.

Dive deeper into SVM and find two essential types: Linear ...

Read more...
πŸ‘2
In the pursuit for an even more authentic market simulator, leveraging random number generation can enhance unpredictability, hence rendering the simulation more intriguing. By following given coding tips, the generation of pseudorandom numbers is possible with minimal complexity. The inception of this is in tweaking the pivot point, which is still created the same, however, the changes will make it unclear whether the bar is ascending due to an already reached minimum or descending due to an already reached maximum.

Moreover, a change in quantity of segments between the opening and closing of the bar is achievable with a small piece of code, turning usual 9 segments into 11 segments. Although it appears simple, this alteration greatly diversifies the complexity we introduce in forming a bar. One should tacitly note that the definition should not be set to zero lest a division by zer...

Read more...
πŸ‘1
In elaborate programming procedures, numeric values often need to be input into an array. Today, we take a look at how a string array can be employed to streamline this process. The focus will be on a 2-dimensional array, yet the measures shared can be extended to an array of any dimension. It offers an elegant solution for managing numeric values and potentially simplifies more complex coding structures. Join the discussion on array manipulation and gain some new insights to enhance the development process.

Read more...
πŸ™4πŸ‘2❀1
A cohesive analysis has been developed covering the interpreting price dynamics and their direct application in trading. This analysis extrapolates a new engineering discipline and outlines its utility in deriving practical conclusions from observed price dynamics. The engineering approaches and algorithms utilized herein are aimed at providing sustainable profits.

Focusing on factors such as the moving average change rate, the normalized price speed, and the probabilities of upward and downward price movement, the analysis draws a comprehensive examination of how price dynamics are calculated and manipulated for trading.

Insights provided aim for the creation of a solid foundation for understanding the intrinsic mechanics of price dynamics and the determination of optimal take profit and stop loss values. The outlined method assists in the prediction of price probability distribut...

Read more...
πŸ‘4
Presenting the 'wd.Range_MACD' indicator, sourced predominantly from the original in-built 'MACD.mq5' in the MT5 terminal, with its copyright belonging to MetaQuotes Ltd. This distinctive tool calculates both the range difference between 'Signal lines and MACD' and the range of 'the last two MACD bars.' Offering additional array of information, it can accurately measure price cross-points, resistance/support levels, and trend transitions.

A quick glance into its mechanism: the direction of the 'MACD bar' (either upward or downward) indicates the trend of the current timeframe. A no difference scenario in the current 'MACD bar' compared to the prior one delineates a new resistance/support level. For example, a difference in range of 'Signal-MACD' of 12 pips and a range of the 'last two MACD bars' of 0 pips imply a resistance/support level based on the 'last two MACD bars' put at a pr...

Read more...
πŸ‘5
Analysis of the healthcare ETF (Exchange Traded Fund) XLV reveals varying factors possibly influencing its momentum and direction. A detailed scrutiny of related datasets, utilized via a multi-layer perceptron model, intends to predict some potential dynamics in the upcoming quarters.

Two noteworthy factors contributing to recent XLV performance include the conclusion of the COVID-19 health crisis, and the Federal Reserve's increasingly bearish stance, both inducing a sell-off pressure across market sectors. As these factors waned, a resulting impact on the healthcare sector and in turn XLV's performance was evident.

Diverse datasets are considered, including U.S. government websites, government agency websites, and third-party research data. Timeframes vary from daily to annual and weekly based on the source.

Examples of data sets under consideration include historical XLV perfo...

Read more...
❀3πŸ‘2
An insightful look at the many paths towards profitable algorithmic trading. Detailed exploration of strategies from head-on approaches to team work, along with an emphasis on knowledge acquisition, provides an enlightening perspective. Finding harmony amidst system development, error fixing and improvizations feed into obtaining a stable income from automated trading systems.

Possible challenges are addressed in the form of labor-intensive points such as EA selection, preliminary testing and real trading. Implementing a universal receiver is viewed as an essential component in managing these challenges efficiently.

The article further delves into EA and pattern work, emphasizing the necessity of optimization skills. The concept of inverted trade is discussed as a noteworthy feature in any EA, crucial for pattern understanding.

In conclusion, leveraging internal algorithms and set...

Read more...
πŸ‘3
The core functionalities of this Expert Advisor (EA) for automated trading are built around a simple moving average. A crossover strategy with the market conditions helps identify possible points of entry for both buy and sell orders.

Formulate the conduct of this EA via a diverse range of customizable parameters. The moving period, lot size, stop loss point, take profit margin, breakeven levels, desired breakeven distances, and pertinent trading hours allow accurate adjustments to suit various trading styles and classes of assets.

The incorporation of two breakeven levels enhances the EA's profitability. Following a profitable trade, the stop loss can shift to the breakeven point, thus safeguarding potential gains. Desired breakeven distances can be amended to fit trader preferences.

The trailing stop feature is instrumental in securing profits amid strong trends. As trades move f...

Read more...
πŸ‘3
The incorrect Actor policy and the lack of connection between the sampled action and the distribution learned by the Soft Actor-Critic model uncovered a potential issue. The model's policy likely depended on a randomly selected learning starting point, and the misaligned action sampling distorted the true value of actions. The optimal solution involves a stochastic model of the actor and sampling actions from the learned distribution. A buffer of random values was implemented to adapt the model's flexibility to complex, noisy data.

Updating was refined by harnessing the Adam method in the Soft-Actor Critic algorithm, allowing the model to adjust the ratios for individual trained parameters. This encourages fast parameters update in one direction and reducing copying speed in multidirectional oscillations, minimizing noise. Although it carries the risk of models imbalance at the trai...

Read more...
πŸ‘4
In the rapidly advancing world of software development, ease of use and efficiency are highly valued. A clear demonstration of this can be seen with the adaptation of drag-and-drop script functionalities. Now, setting a TakeProfit can be accomplished with simple point and click methods on the desired price level. This integration allows developers to streamline their workflow, minimize delays, and increase productivity, opening up new avenues for innovation within the field of programming. Embracing these advancements is the cornerstone for progress in this dynamic, fast-paced industry.

Read more...
πŸ‘4
Delving into the technical nuances of category theory’s influence on MQL5 for traders, this article takes a system-wide approach to unpack morphisms and how they can be utilized to forecast and classify financial data. Conceptually, a natural transformation, central in category theory, can be mistakenly viewed as a simple map between functors.

In this article, the real-world application of these theories becomes the focal point. The categories to be utilized in illustrating natural transformations will be two, the minimum number for a pair of functors to define a natural transformation. The indicator values category aims to clarify these concepts, playing a minimal role in the actual forecast.

Understanding how to normalize indicator values such as ATR and Bollinger Band values is the first step. These values are normalized with a fixed cardinality, and the changes to these values ...

Read more...
πŸ‘3
Introducing a streamlined way of setting StopLoss in trading systems. Now, traders can strategically plan their risk controls by simply dragging and dropping a script onto the desired price level. This innovative technology improves the efficiency of setting StopLoss orders, making the task straightforward and easy to perform. This handy feature is designed considering convenience and speed, promoting seamless and effective risk management. Assure the optimisation of trading decisions with the next-level convenience this tool provides.

Read more...
πŸ‘7
In the article "Applying Monte Carlo method for optimizing trading strategies," there's a discussion about permutation testing and how it can be used to optimize EA with MetaTrader 5. Unfortunately, the article doesn't take advantage of the full potential of this strategy as it suggests that there's no way to conduct such a test on arbitrary EAs within the platform.

To understand the essence of permutation testing, consider it as a scenario where we select a price data sample, conduct a test and record the performance criteria. This sequence is done repeatedly with various permutations of the original price series. This method is more robust the more times we permute and test, and can yield valuable insights into the performance of EAs.

This article aims to present a permutation method involving randomly permuted price data using MetaTrader 5, and we'll also go over how to prepare a...

Read more...
πŸ‘4