MQL5 Algo Trading
390K subscribers
2.58K photos
2.58K 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 complexity of programming continues to make strides in solving intricate and multifaceted problems in stochastic and variable environments. The Control Transformer method, presented in a recent academic publication, proves to be a promising approach. This system utilizes reinforcement learning to engineer flexible control strategies suitable for various contexts. Such adaptability unlocks a new realm of potential in dealing with intricate problems in robotics, autonomous driving, and more, including the world of trading.

The Control Transformer mechanism is divided into several modules characteristic of hierarchical models. One of the main advantages of this method lies in its potency in addressing issues of controlling over extended planning horizons. The solution entails decomposing the problem into manageable subtasks or segments. To structure these tasks, Probabilistic Road M...

Read more...
πŸ‘6
There's an insightful update to share with fellow developers and followers in the world of algorithmic trading. Recently, an unusual implementation of the Commodity Channel Index (CCI) has come to light, which employs exponential moving averages. Quite interestingly, it deviates from the conventional method established by its inventor, Donald Lambert, who integrated simple moving averages in the CCI design.

Furthermore, the code attests versatility with an ability for conditional compilation, making it compatible with both MQL4 and MQL5 coding languages. This broadens its utility for any coder who likes to dabble in MetaQuotes Language programming.

For those familiar with the CodeBase and eager to access and utilise this code, it's readily available. The source code is not tucked away in some corner but placed openly for review and use under the "Public Projects" tab of the MetaEdit...

Read more...
⚑4❀2🀣1πŸ†1
Evolving programming practices draw inspiration from various natural processes. An intriguing example is the Saplings Sowing and Growing (SSG) algorithm by A. Karci, which models tree growth, a long-term survival strategy in nature.

The SSG algorithm serves as an enhancement for other evolutionary population algorithms. Rather than providing a detailed explanation or specifications for algorithmic implementation, the algorithm extends room for experimentation, allowing developers to flex their creativity and apply it based on their understanding.

Conceptualizing trees as optimization agents, the algorithm involves a sequence of steps: planting and growing seedlings, with three primary variation operators - crossing, branching, and vaccination. Although SSG doesn't directly optimize, it improves the quality of optimization in tandem with other algorithms.

The operators of the SSG al...

Read more...
πŸ‘5❀1
Presenting a currency observatory that ensures simplicity while offering customization. Users have the liberty to adjust line color, line width, and font size according to their preference to foster better comprehension. Facilitating thorough analysis, the daily start time defaults to 00:00 however, users can amend this timeframe to start the day at hours and minutes of their picking.

The software leverages advanced computation for precise understanding. An instance to consider would be, if the European Union's Euro gains by +1% and the US Dollar drops by -0.50%, then the EURUSD cross result is an impressive 1.50% which simply implies that 1 subtracted by (-0.50%). This computational methodology persists throughout other currency crosses as well, ensuring accurate and comprehensive results.

Users can expect efficient results delivered in an uncomplicated manner due to the refined a...

Read more...
πŸ‘5🀣3❀2
MQL5 - a language used widely in the development of trading systems on MetaTrader 5 platform - is rich is resources. For developers working with MQL5, mastering these tools and concepts is pivotal.

The role of simple variables and data types in MQL5 is important to recognise when engaging with algorithmic trading system design. The utilisation of simple data types like integer, float, double, string, and bool forms the basis of coding trading software.

Of particular significance is the Datetime data type, which finds near universal usage in trading software. This article looks at a deeper study into the variables and data types in MQL5, underlining their usability when creating MQL5 trading software.

The repository of advanced variables and data types includes Constants, Arrays, Enumerations and Structures among others. Their value lies in their efficient usage in global and loc...

Read more...
πŸ‘7❀2πŸ‘1🀣1πŸ†1
Master the language of MQL5, the robust platform for algorithmic trading, with our comprehensive series. The fifth installment focuses on making array functions more accessible and digestible for everyone. It addresses common misconceptions and intricacies of coding and promotes inclusivity in the domain of MQL5 programming. Herein, a detailed walkthrough of each array function is provided, illuminating the path to coding transformation.

This series isn't just about becoming proficient in MQL5. It's about building a coder community where ideas are exchanged and puzzles are solved collectively. Share, learn, and grow as part of a larger network of novice and seasoned programmers.

Part 5 covers the following array functions: ArrayBsearch, ArrayResize, ArrayCopy, ArrayCompare, ArrayFree, ArraySetAsSeries, ArrayGetAsSeries, ArrayIsSeries, ArrayInitialize, ArrayFill, ArrayIsDynamic, Ar...

Read more...
❀5πŸ‘4🀑1πŸ†1
Dive into machine learning with part 2 of the article on "Quantization and other methods of preprocessing input data in machine learning.” Explore in-depth the various methods of preprocessing sample data implemented in MQL5 for much precise results, sans complex mathematical equations. Consider embarking on an experiment providing valuable insight into the viability of data quantization.

Dissect the function of the "Q_Error_Selection" script, which loads a sample from the "train.csv" file, transfers its contents into the matrix, preprocesses the data, systematically loads quantum tables, and gauges the data's error relative to their original state for every predictor.

Understand the script settings for loading data, managing spikes, streamlining correlation estimation, handling time-unstable predictors, creating uniform and random quantum tables, and saving the transformed selecti...

Read more...
πŸ‘5❀3πŸ‘2
A process of recording trade information within a CSV file is proposed. Users will need to save these files in the elaborated folder -- MQL5\File. Optimal results are achieved with utilizing the same Meta Trader 5 broker's terminal to reconcile time differences. This method has outstanding applicability to both Forex and Gold charts that were previously tested.

The procedure for running the expert adviser on each chart is simple. Enter the file name (filename.csv) in the expert adviser's input field. During trading, it visually uses distinct indicators. Blue arrows with trend lines signify buy signals, likewise, red arrows alongside trend lines indicate sell signals.

It's significant to underline that once the expert adviser is removed, all the visual objects (both arrows and trend lines) disappear. This approach ensures a clean slate for future operations. Thus resulting in a strea...

Read more...
πŸ‘11❀3πŸ‘2🀑1
Optimization of stop loss and take profit values remains a vital necessity for traders. Primarily, these are used to control financial risks and apply effective money management principles. There are those, however, who skip using stop orders, relying on market predictability instead. They argue that instances where prices reach the stop loss then reverse could have ended profitably if the stop loss order was never in place. Subjective assessments of this sort can lead to significant issues, such as enforced stop outs by the brokers.

We can approach the selection of stop loss and take profit levels rationally, by understanding the probabilities of price reach at any given level. Employing a simple model, where each position opens at the 'open' price, and the duration of holding the position is established in N bars. The price deviations gathered for statistics are essential in well-i...

Read more...
πŸ‘4πŸ‘4❀2🀣1
The significance of abstract mathematical concepts often becomes apparent when applied to concrete systems. This concept is superbly demonstrated within the MQL5 Wizard's adeptness in transforming vague ideas into tangible trading systems for validation and assessment. This unique feature provided by the MQL5 wizard is particularly beneficial for Expert Adviser assembly.

Diving into the wizard's expert classes, a vast variety of essential features like opening and closing trades are noted. However, the critical consideration of executing decisions only at the new bar formation is often overlooked. This functionality allows independent testing and comparing of ideas or methods, making the MQL5 Wizard a versatile tool.

The series discusses different clustering methods such as agglomerative clustering and k-means clustering, where the user must specify the number of clusters in advance...

Read more...
πŸ‘6❀4πŸ”₯1
The Multi-currency Expert Advisor has been developed as an advanced automated trading tool designed for 30 pairs and using the ZigZag indicator, which is enhanced with the Awesome Oscillator. It harnesses the power of MQL5 to provide a reliable, efficient, and effective trading solution.

It is designed to trade on a wide array of Forex and Metal pairs, with the ability to operate as a single-currency or multi-currency EA, depending on the trader's preference.

The ZigZag indicator is used to measure price movements without unnecessary noise. It holds a robust position in the world of technical indicators and is valuable in helping to identify market trends and price fluctuations.

The Expert Advisor's trading management system allows for different types of Stop Loss and Take Profit orders, and there's also an option to enable or disable trailing stops. It can perform trailing stops...

Read more...
πŸ‘5❀3πŸ‘2
The Test-Driven Development (TDD) methodology offers numerous benefits, including well-defined units, thorough test coverage, and a clear understanding of the domain. However, the focus on solving one challenge at a time can lead to accumulating technical debt. Despite this drawback, refactoring is integral to TDD practice, allowing developers to manage and clear technical debt.

In addressing the complexities involved in developing MQTT protocol, attention is drawn to the importance of the persistence layer, which could range from a simple file in the local filesystem to a complex database in the cloud. However, before delving into session state management and persistence layer, it's crucial to thoroughly test the writing and reading of packets. Thus, extensive unit tests are conducted, along with small functional tests against a real broker running locally.

In building PUBLISH pac...

Read more...
πŸ‘6πŸ‘2❀1
The Pretrained Decision Transformer (PDT) method, an offshoot of the Decision Transformer tool, presents an innovative approach to training using unlabeled data. PDT relies on Transformer attention strategies and has been shown to deliver extended utility in various practical applications.

The PDT technique eschews the use of labeled training data during pre-training, zeroing in on learning and adaptation of general behavioural patterns. This task-independent, generalised learning can be implemented with an array of different tasks later on.

PDT's pre-training approach focuses on training the model offline through previously collected trajectories, devoid of reward labels. Upon successful completion of pre-training, the model is fine-tuned for the target task via online interaction.

This RL pretraining method is of particular interest for its ability to train on data without rew...

Read more...
πŸ‘5πŸ‘4✍2
Understanding the exact requirements for adjusting stop losses in a high-frequency trading environment is a challenging task. The MoveStoploss tool streamlines this process by providing automatic monitoring of all manual trades. The tool, adaptable to various market trends, offers customization in terms of the trailing distance that can be preset or determined by expert advisors.

MoveStoploss is not restricted by the type of financial instrument or a specific timeframe. Its versatility makes it an invaluable asset for traders dealing in either currencies, commodities, cryptocurrencies, or stocks. By incorporating the auto trail feature, it removes the burden of manual trailing while generating accurate stop-loss points.

Furthermore, the tool allows users to switch off the auto trail feature and manually input a preferred stop-loss distance, offering a balance between automation an...

Read more...
❀11πŸ‘9πŸ‘3
Discover the world of Behavior Cloning (BC) methods with the Decision Transformer and its various modifications. BC techniques focus on imitating expert trajectories according to environmental states and desired outcomes. However, it should be noted that the expert assessments of similar environmental states could significantly differ, sometimes even going in completely opposite directions.

A reminder, past works did not involve experts to create our training set. Instead, there was a selection of best trajectories through various methods of sampling the Agent's actions. Admittedly, these trajectories were not always optimal. Due to the process of sampling in a continuous space of actions and episodes, it is impossible to capture all possible options. The chosen trajectories often satisfy only a portion of our requirements and often resemble outliers, which the model might simply dis...

Read more...
πŸ‘6❀2
The comprehension of machine learning's capabilities has evolved sequentially over years. Emphasizing on time-series classification, an understanding that machine learning algorithms can predict and generalize well but struggle with discerning cause-and-effect connections has emerged. Machine learning perceives all training data as just that, training data, potentially creating blunders for novices attempting to use it for profitable trading with new data.

Our goal is to develop an algorithm that significantly reduces overfitting by autonomously locating patterns in data. This algorithm should not only generalize training examples but efficiently ascertain the existence of cause-and-effect relationships within them.

Considerations from artificial intelligence efforts in Forex have led to the idea of self-controlled machine learning models, which check their predictions for errors re...

Read more...
πŸ‘8❀5πŸ‘1
In light of developments surrounding chart reading in programming, technicalities around searches for Wick or Body based High/Low in visible bars have resurfaced. To elucidate, Wick based High, in essence, is a particular type of configuration within this scenario, acting as an example of high/high readings. In juxtaposition, the Body-based High exemplifies a different situation where the body of the chart, instead of the wick, defines the pinnacle.

Each method presents its unique interpretation of the data, running along the visible bar range. Analysts and developers should consider both methods’ distinct features for a more comprehensive understanding of chart readings. Remember, this encompasses but isn't limited to, the chart's highest and lowest points. A deeper grasp of Wick and Body-based High/Low readings can significantly enhance the interpretation of chart data.

Caution ...

Read more...
πŸ‘11❀1πŸ‘1πŸ†1
Learn how to fine-tune your data analytics skills with a sophisticated indicator tool that encompasses 14 distinct types of moving averages calculations. This tool, leveraging its operational foundation on Pine Script libraries, closely ties each computation to the price close data.

This powerful indicator includes a wide range of calculation types: namely SMA, EMA, WMA, VWMA, RMA, DEMA, TEMA, ZLEMA, HMA, ALMA, LSMA, SWMA, SMMA, and DONCHIAN. Enhance the accuracy and precision of data interpretation by utilising this comprehensive tool, specifically designed for ease of use and optimal efficiency.

Stay at the vanguard of data analysis by implementing this advanced indicator. Dive beyond basic calculation approaches and discover the potential of moving averages to provide more intensive and well-rounded insights.

Read more...
πŸ‘6πŸ”₯6
This media is not supported in the widget
VIEW IN TELEGRAM
πŸ”₯33❀23πŸ‘23πŸ‘6πŸ†6πŸŽ‰5πŸ’―4
Struggling with the idea of creating your own Expert Advisor or programming indicators? Reading code doesn't translate to understanding it. The process might seem complex but with a step by step guide, even beginners can grasp how to automate trading.

Taking a look at the MQL5 language, which is not only for trade automation but extends to plotting indicators, creating files, working with databases, and much more. This guide is for traders eager to harness programming for their benefit - reducing dependency on programmers by acquiring MQL5 language proficiency.

Learn basic programming and technical terms; familiarize yourself with central processing units (CPU), random access memory (RAM), execution thread, bit, byte, and external drives. This guide simplifies the functionalities of each, sharpening understanding around the building blocks of programming.

Before launching into pro...

Read more...
πŸ‘8❀5πŸ‘3