If you've been looking for a comprehensive list of modified moving averages to use in your strategies, consider this compendium open to the IT community. This is not the original material - it has been brought here from the MQL5 forum, as it is otherwise unavailable to the public.
The algorithms include the Simple Moving Average (SMA), Exponential Moving Average (EMA), and Wilder Exponential Moving Average (Wilder), among a host of others. To further amplify its utility, price points used to construct moving averages range from open, close, high, low, median and weighted average, providing a versatile tool for trading predictions.
Tailor it to your preferences with the adjustable MA_Period defaulting at 14 for the averaging period of the moving average. MA_Shift equals 0 allowing you to shift the moving average by a certain number of periods, and ShowInColor can be set to ‘true’ en...
Read more...
The algorithms include the Simple Moving Average (SMA), Exponential Moving Average (EMA), and Wilder Exponential Moving Average (Wilder), among a host of others. To further amplify its utility, price points used to construct moving averages range from open, close, high, low, median and weighted average, providing a versatile tool for trading predictions.
Tailor it to your preferences with the adjustable MA_Period defaulting at 14 for the averaging period of the moving average. MA_Shift equals 0 allowing you to shift the moving average by a certain number of periods, and ShowInColor can be set to ‘true’ en...
Read more...
🎉4👌2⚡1👍1
In our constant pursuit towards achieving a 100% automated Expert Advisor (EA), minor revisions to the pre-existing segments of code are crucial due to potential interactions between the trader and the EA. Primarily, alterations in sections where data exchanges occur are fundamental. The factors to consider include robustness, reliability, stability, scalability, encapsulation, and efficiency of the system. The precise efficacy of the system depends extensively on having three core code directories: development, working, and stable. This structure aids refactoring and debugging, allowing programmers to pinpoint areas requiring modification or elimination.
Essential modifications have been made to the timing system and the order system. These changes provide greater stability and agility, respectively. Further steps delineate towards transforming the manual EA, ensuring proper automa...
Read more...
Essential modifications have been made to the timing system and the order system. These changes provide greater stability and agility, respectively. Further steps delineate towards transforming the manual EA, ensuring proper automa...
Read more...
👍6❤1👏1
Discover the benefits of using current profit over pip distance for take profit in Expert Advisors (EAs). The EA NextBot code manages this effectively, particularly useful when juggling multiple open positions or using different EAs concurrently. One considerable advantage includes sidestepping potential pitfalls that a pip-based take profit might encounter, such as limiting profits due to broker slippage. For a comprehensive understanding of this, consider referencing the code of EA SwingBot.
The key to this approach is calculating the total number of open orders through a magic number, a unique identifier assigned to an order. A distinct code is then used to calculate the current profit by iterating through all open orders using a loop function. After each iteration, the order's profit adds to a variable thus accumulating the total profit. Additionally, minimum profit can be set ex...
Read more...
The key to this approach is calculating the total number of open orders through a magic number, a unique identifier assigned to an order. A distinct code is then used to calculate the current profit by iterating through all open orders using a loop function. After each iteration, the order's profit adds to a variable thus accumulating the total profit. Additionally, minimum profit can be set ex...
Read more...
👍4👏1
A detailed examination of the challenges faced when developing a replay/simulation system for trading is available. Key points include the importance of maintaining code reliability and stability, as well as the complexity of creating a replay/simulation system that mimics a real account's operation.
This assessment also identifies potential pitfalls of developing a replay/simulation system, such as dependencies in the main code and the lack of utility in creating a simulation if the same resources are not available when the real account is used.
Within this article, you'll find a breakdown of these complexities, including the necessary timer mechanisms for accurate bar trading simulation. It discusses setting a timer in a replay/simulation system, using the MetaTrader 5 platform as a case study.
Furthermore, it deals with the challenge of adapting time-focused codes and systems...
Read more...
This assessment also identifies potential pitfalls of developing a replay/simulation system, such as dependencies in the main code and the lack of utility in creating a simulation if the same resources are not available when the real account is used.
Within this article, you'll find a breakdown of these complexities, including the necessary timer mechanisms for accurate bar trading simulation. It discusses setting a timer in a replay/simulation system, using the MetaTrader 5 platform as a case study.
Furthermore, it deals with the challenge of adapting time-focused codes and systems...
Read more...
👍2❤1👏1
Discussing the elaboration and working of the C_Mouse class, which applies the principles of object-oriented programming for smooth extension of functionalities. Untested parts can be implemented and tested in parallel, without affecting the main code. This reduces the potential for inadvertent bugs, offering advantages especially for large production projects. The article also emphasises the importance of using directory structures to revert back to earlier development stages when necessary.
There is further exploration of the integration of this with the C_Studies class, using pointers for extended functionality. Thus transforming minor projects into valuable additions to the final project, all while preserving the integrity of the class system. Analyzing two paths for system progress, with detailed code comprehension, this article provides essential insights for developers.
The...
Read more...
There is further exploration of the integration of this with the C_Studies class, using pointers for extended functionality. Thus transforming minor projects into valuable additions to the final project, all while preserving the integrity of the class system. Analyzing two paths for system progress, with detailed code comprehension, this article provides essential insights for developers.
The...
Read more...
👍4✍2
This update brings a notable implementation twist to the Commodity Channel Index, using exponential moving averages rather than the simple moving averages traditionally used by creator Donald Lambert. This change, practical and designed to enhance adaptability, demonstrates the evolving nature of programming methods.
This new method incorporates the use of conditional compilation, ensuring functionality on both MQL4 and MQL5. From a comparative standpoint, this strategy brings a significant advantage, enhancing compatibility and efficiency.
For those keen on keeping up with the latest CodeBase publications, rest assured that every piece of source code is readily available under the "Public Projects" tab in MetaEditor, listed under the name "FMIC". This easily accessible resource fosters a continuous learning environment to both seasoned and novel programmers alike. Keep pace wit...
Read more...
This new method incorporates the use of conditional compilation, ensuring functionality on both MQL4 and MQL5. From a comparative standpoint, this strategy brings a significant advantage, enhancing compatibility and efficiency.
For those keen on keeping up with the latest CodeBase publications, rest assured that every piece of source code is readily available under the "Public Projects" tab in MetaEditor, listed under the name "FMIC". This easily accessible resource fosters a continuous learning environment to both seasoned and novel programmers alike. Keep pace wit...
Read more...
❤1
Progress report on latest development efforts – efforts have been geared towards building the replay/simulation system further. A pivotal component that has been left largely untouched upon – the order system – has now been brought front and center. This crucial part of the entire modeling system enables practical analyses. The aim is to accurately mimic a trading server in a way that is unnoticeable to the user.
The final product is expected to provide a seamless experience that is identical in both the tester and the real market, without necessitating compilation adjustments between them. By focusing on a single-compile Expert Advisor (EA), the user experience is expected to be much enhanced. The plan is to start with a basic EA model and adapt progressively.
Adaptation involves incorporating the revolutionary C_Orders class. Encapsulation is highly upheld, and the process invol...
Read more...
The final product is expected to provide a seamless experience that is identical in both the tester and the real market, without necessitating compilation adjustments between them. By focusing on a single-compile Expert Advisor (EA), the user experience is expected to be much enhanced. The plan is to start with a basic EA model and adapt progressively.
Adaptation involves incorporating the revolutionary C_Orders class. Encapsulation is highly upheld, and the process invol...
Read more...
👍3❤1👏1
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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