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
The week presents an opportunity to comprehend the inner workings of the Rsi() function. Recreating it, developers could gain significant insight into crucial concepts and codes applicable in forthcoming projects.

Key areas to focus on include path limitation within the oncalculate function, FOR loops, and static variables. Further, the exercise imparts knowledge on writing and documenting functions as well as flags.

Additional information can be accessed directly at the following link: https://www.mql5.com/fr/users/william210.

For those with innovative ideas for development, they can be suggested at https://www.mql5.com/en/forum/453288.

Links to beneficial free indicator codes for beginners in Mql5 development have also been provided. These include those for Rsi, MACDr, Momentum, the Moving average, Bands Bollinger, Ichimoku, Adx, and Stochastic functions.

The primary aim is...

Read more...
❀3πŸ”₯1
Sifting through and optimizing the Go-Explore algorithm for agent training yields promising results for tackling substantial training periods. In this exploration, the effectiveness of the Go-Explore algorithm in data modeling is considered over a four-month stretch of training data.

Initially, the model is scrutinized for shortcomings. Fixed constant values are adjusted to suit large-scale training periods, and data sorted is excluded due to inefficiency. The collective actions are then constrained on volume to avoid accumulation of negative or positive constructs.

Several additional tools were adopted to further improve and regulate the model’s performance. For risk control, a maximum limit is implemented on the duration an open position can be held. This regulation protects against outsized losses. To improve the quality of forecasting, the training set is divided into smaller s...

Read more...
πŸ‘2
In response to the classic MQL4 indicator, a new version with superior features has been developed in MQL5. This variant allows for added customizability and increased precision by offering an adjustable fractals period. This feature is reassuring as the built-in fractal indicator resorts to using period 5.

Additionally, specification of prices for high and low can be chosen to allow for enhanced convenience in extreme market conditions. The use of such feature can demonstrate its worth in instances such as a turbulent whipsaw market scenario.

From a mathematical perspective, the method employed for fractal calculations is significant as it doesn't restrict fractal up and fractal down at the same bar. This approach is deemed right and can eliminate any bias that doesn't have a mathematical basis. Limiting such calculations to just one fractal per bar might introduce a bias unwarra...

Read more...
😴3πŸ‘1
A new guide on creating a local LLM (Large Language Model) running environment using Windows+WSL is now available. The guide covers the whole process, from setting up WSL2, a version upgrade from Microsoft's Windows Subsystem for Linux (WSL), to training AI with Linux tools in a Windows environment.

The article hints at the efficiency of WSL2 - it uses a real Linux kernel, is faster, and does away with the need for dual system setups or Windows+VirtualMachines. Usage of Linux tools in the Windows environment, is also made more convenient.

The guide covers WSL2 installation, detailing requirements and common WSL commands for the software configuration. It provides steps to migrate the subsystem to different disks or partitions if needed, and outlines how to setup configuration files.

For those with NVIDIA's graphics card, the guide takes you through installing NVIDIA CUDA accelerat...

Read more...
πŸ‘2
The application of hierarchical reinforcement learning in trading proposes a hierarchical model capable of optimal decision making across variable market conditions. The suggested model utilizes global-level and local-level reinforcement learning which broadens the decision-making architecture and effective knowledge utilization. The advantages of hierarchical models in trading spans from adaptability, efficiency, resource allocation, and stability to interpretability of results.

Adapting a hierarchical model allows for comprehensive market condition analysis, taking into consideration macroeconomic factors like political events or economic indicators. A lower level analysis takes into note factors such as technical analysis and other asset-specific information to generate informed decisions and adapt to varying market situations.

Hierarchical models can efficiently use all availab...

Read more...
πŸ‘2
The recently implemented Hull MA now features four customizable input parameters: InpHmaPeriod of 20, InpColorKind (single_color), InpColorIndex (color_index_3), and InpMaxHistoryBars of 240, all designed function in a self-explanatory manner.

Central to the user experience is the ENUM_COLOR_KIND, a pivotal enumeration allowing a switch between single and multi-color modes – defaulting to single color. The multi-color mode brings diversity to the Hull MA’s aesthetics with divergent colors for rising and falling values.

Conversely, in single color mode, the Hull MA's hue is determined by the ENUM_COLOR_INDEX, while in multi-color mode, the default color is grey, changing to green for upslopes and red during downslopes.

The sample images below show these color changes in effect. The carefully crafted code is available for users' access to enable more flexibility in operational use....

Read more...
❀3πŸ‘1
Investigating the issue of model procrastination in reinforcement learning, often a challenge when the learning process stagnates, this article scrutinizes numerous causes and methods to address them. Insufficient training environments, task complexity, and lack of motivation or feedback can all contribute to the issue.

One crucial solution lies in diversifying training data and resources. Simplification of tasks, algorithm optimization, and efficient utilization of resources also prove decisive in remedying the situation. Additionally, setting clear goals, bolstering the reward function, and implementing consistent evaluations of the model’s progress will encourage active participation.

If a model stagnates from lack of updates, establishing regular update cycles based on new data improves the learning progress. Furthermore, creating a stimulating environment with varied tasks enco...

Read more...
πŸ‘Ύ4πŸ‘2πŸ”₯1
Analyzing performance metrics of Expert Advisors (EA) remains a primary concern for developers, especially regarding the propensity of certain tools like MetaTrader 5's Strategy Tester to produce potentially misleading results. The crux of the issue: apparent "trick" EAs can appear to give extraordinarily successful projections which fail to materialize in practice. This phenomenon appears to be due in part to permutation testing, a tool that suggests a more robust view of a strategy's potential outcome.

This approach involves the permutation of price bars, a strategy that strives to maintain the original price series' general trend while ensuring the open or close of a bar stays within the boundaries of the high or low respectively. The spread of price changes must also endure from the open to the close, with bar-to-bar price changes moving in the same distribution as well.

For th...

Read more...
πŸ‘2
Understanding the dynamics of trading can be challenging. High on the list of advanced techniques is analysis through Wick Ratio Candlesticks. This innovative approach differs from conventional models due to focusing on the upper and lower wick ratio, rather than the typical open and close properties.

When an equivalence is found between the upper and lower wick, a 'snow candle' characteristically appears. Alternatively, a plot of a 'bear candle’ manifests if the upper wick surpasses the lower wick, and when the upper wick falls beneath the lower wick, a 'bull candle' is illustrated.

The visual representation also offers customizable aesthetics via indicator settings, allowing for a more tailored approach. Deviation from traditional models offers traders a fresh perspective and additional tools in their arsenal, making this technique an interesting consideration for integration into...

Read more...
πŸ‘3πŸ‘Ύ3
Discussions around reinforcement learning have largely revolved around the challenge of defining a reward function to guide an agent's behavior. The problem intensifies when multiple goals or ambiguous situations are involved. There may also be tasks where an explicit reward function seems elusive, limiting the application scope of conventional reinforcement learning methods.

One solution to these hurdles is the "Diversity is All You Need" method. This approach encourages a model to learn a skill without relying on an explicit reward function. By focusing on diversity of actions, maximizing interaction variability with the environment, an agent can be effectively trained. This makes models more flexible and adaptable, helping them deploy different strategies depending on task requirements.

The principle takes another bold step by asserting that an agent's current state depends not o...

Read more...
πŸ‘2πŸ‘Ύ1
The interplay of adaptive HMA and its smoothed line offers an efficient trend indicator for developers. This approach proves valuable when anticipating the early emergence of a trend, particularly if paired with a flat indicator. Despite its efficiency, never forget the importance of conducting thorough analysis and cross-validation to ensure accurate results. Optimizing performance is crucial in programming, as it bolsters the underlying algorithms and assures a balanced integration of code and analytics. Always make sure to use the right tools and techniques to derive the most precise estimations for predictive modeling and machine learning.

Read more...
πŸ‘Ύ2πŸ‘1
Proposing a fresh approach to forecasting problems in complex stochastic environments, a method named Dynamics-Aware Discovery of Skills (DADS) was established in 2020. The most challenging aspect of these problems is creating a model that performs acceptably outside of a training set. However, DADS helps overcome this by subdividing tasks, improving the overall model performance.

In previous models, the Divided Into Additive sub-Yielding (DIAYN) method was employed, rewarding unpredictable behavior to encourage the training of diverse skills. Nevertheless, a balance between predictability and skill variety was missing.

The DADS method caters to this gap. It endeavors to train skills that are diverse, yet predictable. The method uses unsupervised reinforcement learning systems, prioritizing the explicit goal of facilitating model-based control.

A unique feature of DADS is learning...

Read more...
πŸ‘2πŸ™2❀1
In extending the CCI indicator's functionality, the use of an executable iCCI function call has now been included. This additional feature now provides a shift parameter to control the displacement in terms of user-defined bars.

This newly included code serves both a practical and pedagogic purpose, demonstrating how to incorporate a shift function into any buffer index-based indicator. By employing [i + shift], the index is effectively shifted forward within the buffer, enabling the user to access values ahead of the current bar i.

To put it in a visual context, this action essentially shifts the plot from right to left. The accompanying script "Test_CustomCCI" exemplifies how iCustom can be employed in conjunction with this updated indicator.

To optimally use these additional functions, it's recommended to compile both files in the Indicators/Examples folder, initiating with CC...

Read more...
πŸ‘1
Market Replay System Update:

The latest iteration of the market replay system introduces several improvements and changes to ensure functionality and stability. A critical concern had been the inability to seamlessly insert data into existing bar files for different trading timelines. This created unnecessary complexities and database management challenges.

The updated solution has new directives ensuring that necessary controls are compiled with the replay service to avoid unaccounted anomalies. Changes also include better system testing to confirm file suitability for replays and necessary fail-safes for user cancellations or unexpected interruptions.

Additionally, traders who prefer to operate in specific timeframes or full-screen modes will find the updated replay system particularly useful. It allows for customized settings for better convenience and usability. The replay serv...

Read more...
πŸ‘3
Introducing a streamlined approach to CSV file reading, with no prerequisites or type casting declarations required. The implementation of this simple class enables one to carry out CSV file reading tasks efficiently. Here is a concise illustration of its application. This approach significantly cuts down on coding time, while promoting code readability and maintainability. Utilize this simple class to achieve faster development cycles and increase productivity. Top developers assure its practicality.

Keep in mind that reducing unnecessary code helps prevent potential bugs and errors. This is not just a tool, but a practical step towards more robust and cleaner codes. The use of this class should be considered by anyone seeking seamless file reading operations. Enhancements in speed and efficiency are noteworthy. Adopt this minimalistic coding approach today for an improved coding e...

Read more...
πŸ‘1
The discussion at hand concerns attempts to optimize certain aspects of a relational model previously devised for the purpose of creating an Expert Advisor. Noted drawbacks included the low learning rate resultant of complex architecture as well as an undesirably high memory footprint due to an increase in memory consumption throughout the model's training time. One proposed solution to these challenges is the application of Sparse Attention, a technique which seeks to rein in computational complexity throughout the stages of an algorithm.

Potential pitfalls of this method include the risk of oversight or underestimation concerning essential sequence elements, which may result in vital information being lost. Attempts to optimize specific instances of a sequence can also prove problematic in cases where instances are mistakenly identified as insignificant and disregarded. This metho...

Read more...
❀1πŸ‘1
Gaining an edge in chart analysis is the key to more successful strategy execution. Many seasoned developers recommend utilizing intuitive indicators for better results - one such indicator illustrates the ratio of movement sizes within a bar to the current bar size.

The application of this method can provide an efficient validation of signals. Through consistent usage and observation, there's a potential for developers to extrapolate advantageous insights from their data.

To better understand and implement this method, consider examining specific instances where such an indicator has been employed successfully. Critical exploration of these examples can bolster understanding and encourage innovative use of this valuable tool, instigating a deeper appreciation for its efficiency.

Overall, consider integrating this indicator into routine operations whenever applicable. It could a...

Read more...
πŸ‘4
View the latest detailed introduction to the world of programming wizard MQL5. This particular piece focuses on the concept of dendrograms, a crucial part of Agglomerative Hierarchical Classification (AHC). AHC is a method employed to assimilate different aspects of a dataset, grouping them systematically until the dataset can be viewed as a uniform entity. One of its chief outputs is a dendrogram. The discussion here zeroes in on how these clusters of data can be effectively used in predicting and forecasting price bar range apart from managing monetary aspects.

Absorbing price range forecasts depends largely on the trader’s overall strategy and approach. For instance, it might not take center stage when minimal leverage is used, or when trade positions are held over longer durations. Nevertheless, price bar range becomes integral for intra-day traders or individuals whose exposure...

Read more...
πŸ‘1
Unraveling the mystery of Goal-conditioned Reinforcement Learning (GCRL) in the context of maximizing total rewards. Examining the advantages of training an agent to select strategies and achieve distinct subtasks within certain scenarios uniquely. GCRL enables agents to reach different goals based on the current state of the environment. It's a nuanced extension of typical skill training methods but uses distinct approaches for agent training.

GCRL introduces specific subtasks and related rewards. Rewards for achieving a subtask need a balanced approach; they shouldn’t outweigh possible operational profits or losses but should reflect the task at hand. The informative vector describing the task for GCRL needs to clearly indicate the subtask for the agent to achieve at a certain point in time.

The advantages and downsides of both the skill training and GCRL approaches can be seen, l...

Read more...
πŸ‘1πŸ‘€1
Sharing an update in the world of coding. Upon reevaluation and constructive inputs, the code to incorporate the Keltner channel into graphs is now available.

This code has been streamlined for newcomers, maintaining a focus on simplicity paired with robust development principles. Its straightforward structure is accompanied by helpful comments crafted for easy comprehension.

Furthermore, a slew of other resources are available on the Mql5 iFunctions platform, courtesy of William210. These include beginner-friendly codes for indicators such as ADX, Alligator, AMA - Adaptive Moving Average, ATR - Average True Range, Bollinger Bands, Ichimoku, MACDr, Momentum, Moving average, Rsi, and Stochastic.

For those keen to expand their understanding, a couple of more advanced codes are available too. These demonstrate computations of the indicators without resorting to the Mql5 iFunction. T...

Read more...
πŸ‘1