MQL5 Algo Trading
391K 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
Insights into refining the training performance of Expert Advisors: Emphasizing the significance of signals transmitted to neural networks for optimal analysis and future forecasting is fundamental. Improvements in this area could significantly impact system performance. Normalizing indicator data holds particular interest. Let's break it down.

Dealing with inputs normalization: A vital step in nurturing neural networks stems from data normalization. This process helps stabilize the inputs, speeding up training convergence. Knowing the 'why' and 'how' behind normalization is a game-changer.

Understanding input normalization: Transformed input data has specific value range, brought about by either z-normalization or min-max normalization. The former uses mean and standard deviation for centering and scaling, while the latter uses minimum and maximum values to scale data accordingly....

Read more...
πŸ‘5πŸ‘1πŸ†1
In an effort to make multi-trading less complex, a script has been devised that aids traders in promptly opening multiple buy orders. It's aimed at executing high volumes of trades by single command input. As per most brokers' standards, the default specification of take profit (TP) and stop loss (SL) values are set in a 5-digit format. However, for those employing a 4-digit broker, the default expected should be TP=40 and SL=20.

The parameter Num_of_Buy dictates the desired number of trades the trader wishes to launch instantaneously. This script effectively mitigates time constraints and adds value for traders keen on optimal utilization of fluctuating market conditions. It simplifies the engagement with multiple buy orders and provides an opportunity to concentrate on varied facets of their trading strategies.

In essence, this innovative utility can lead to elevating the overall ...

Read more...
πŸ‘8❀1πŸ‘1
In a recent development, the replay/simulation system has been tailored to utilize market data; for instance, FOREX. Adjustments have been made to the system to handle varied market types. A BID-based display system has also been integrated for specific assets or markets. Moreover, measures have been instituted to prevent the system from "lock-ups" due to non-existent transactions for any asset over a given duration.

To improve the user experience, the configuration file has been redesigned for ease of use and any errors are now indicated during the service launch. This has prevented instances where the system fails due to disruptions or changes in asset configurations.

The configuration file is now loadable into memory, which allows for reading 'on-demand' of specific elements, optimizing system performance. This approach utilizes functions such as FileSeek and FileTell for seque...

Read more...
πŸ‘3πŸ‘Œ2
Understanding and analyzing Fair Value Gaps (FVG) are critical in the realm of ICT's smart money concept. This notion comes into play when there's an imbalance of 1 point or more between the high of the first candle and the low of the third candle in bullish market trends. In contrast, for bearish market trends, the same principle applies inversely to the low of the first candle and the high of the third candle.

The distinctive feature of the FVG approach is its significant potential for customization. Development enthusiasts can tailor the colors of the FVG through indicator configurations, offering flexibility for visual differentiation and enhanced understanding. Such customization in color-coding assists in better discerning market conditions, making for a more streamlined and insightful analysis.

On this note, remember that mastering these strategies and in-depth knowledge of ...

Read more...
❀3πŸ‘3
Understanding and proficient use of the MQL5 strategy tester can significantly enhance the performance of created MQL5 programs, leading to better trading results. Some crucial areas of focus should be errors, debugging, and strategy testing.

Errors during program creation, execution, and running MQL5 programs are a norm rather than an exception. Understanding the nature of these mistakes is critical for a smooth programming experience. This involves tackling compilation errors and warnings, runtime errors, and trade server errors.

Debugging is another essential topic that allows programs to be executed interactively, providing insights into error identification and solution. Various tools within the MQL5(Debugger) facilitate this process, ultimately refining the final program.

Incorporation of the Strategy Tester elevates the effectiveness of MQL5 programs. It allows for the tes...

Read more...
πŸ‘3❀1πŸ‘1
Notable in the realm of trading scripts is one designed to assist traders who desire to expedite the process of opening multiple sell orders. By issuing a single command, numerous trades can be initiated quickly.

The script, well-crafted to accommodate a variety of broker formats, carries default take profit and stop loss values set in 5-digit broker format. Notably, for those utilising a 4-digit broker, the default alterations are to be TP=40 and SL=20.

Num_of_Sell, an attribute incorporated into the script, designates the aggregate number of trades for execution. This attribute augments the script’s utility for traders seeking to assimilate market information speedily for advantageous trading.

By distilling the complexity of launching multiple sell orders to a simplified process, the script serves as a critical time-saving tool. It enables traders to devote their focus on culti...

Read more...
πŸ‘7❀2
Part Four of the MQL5 series is live. This installment will cover three fundamental aspects critical to any developer: Structures, Classes, and Time functions.

Structures in MQL5 serve as user-defined data types that can store information related to one or multiple related entities. They can enhance code clarity and reusability in trading scripts and expert advisors.

Classes, on the other hand, exist as blueprints for creating objects. Objects are specific instances or realizations of a class, each possessing unique properties and capabilities as dictated by its parent class.

Lastly, Time functions are essential tools enabling developers and algorithmic traders to work with time-related data. They're used to retrieve current server time, convert time values, and much more.

Remember, questions are encouraged and increase collective understanding. The goal is to make MQL5 accessib...

Read more...
πŸ‘4✍2πŸ‘1
Presenting the Stochastic Diffusion Search algorithm, an intriguing component of Swarm Intelligence metaheuristic, resting on a solid mathematical foundation. Originating from 1989, it was designed for discrete optimization. Its potential for global continuous optimization surfaced in 2011.

This fascinating algorithm relies on direct communication between agents, similar to communication mechanisms observed in nature among Leptothorax acervorum ants. It facilitates strong hypothesis evaluation and efficient dissemination of promising solutions, significantly reducing computational complexity.

A noteworthy aspect of SDS is its potential applications in the Restaurant Game or Gold Mining Game. These scenarios stimulate optimization problem-solving through agent information exchange and hypothesis evaluation. Nevertheless, SDS might struggle with problems that don't align with the conc...

Read more...
πŸ‘4πŸ”₯1
In the latest algorithm examination, analysts set their focus on the behavior of candlesticks patterned after a frog's hop. This approach denotes that a frog does not merely leap a single 'leaf' block in a 'pond' but covers a range from leaf 1 to leaf 3 or beyond.

This particular indicator serves to obscure standalone candlesticks that don't fit into the specified 'frog hop' pattern in the experiment. Consequently, if a candle is a bull and the subsequent candle is a bear, with its preceding candle also bearing the same characteristic, it is marked as an 'alone' candlestick and concealed on the chart. The same can be said for a bear candle.

The results of this experiment can be viewed easily; With the hidden 'Alone Candlestick' on the left and the Standard Chart on the right. This offers an intriguing insight into the behavioristic patterns of candlesticks in the world of algorithms.

Read more...
✍6❀4πŸ‘2
Automated trading systems are becoming essential for financial markets. These systems analyze the market and execute trades using predefined rules and algorithms. Yet setting up and running robots on multiple charts can be time-consuming. In response, a universal robot template for MetaTrader 4 and 5 can be established, simplifying the setup process and saving time for traders.

This solution was inspired by the desire for user comfort and the need for multicurrency characteristics testing. While this template does not offer a perfect solution, it is highly beneficial in testing multiple strategies and maintaining system efficiency.

There are some notable differences between MetaTrader 4 and MetaTrader 5 terminals that impact the use of this template. The latest MetaTrader 5 has a powerful tester that provides features enabling tests on multiple instruments simultaneously but MetaT...

Read more...
πŸ‘5
In the realm of trading, speed and efficiency are key factors that greatly contribute to success. An innovative script file has been designed to provide traders the advantage of placing a multitude of buy orders with just a single command.

Aimed to serve those who manage high-volume trades, precision is still guaranteed with predefined default take profit and stop loss values. Set in a 5-digit broker format, the default can be adjusted to TP=40 and SL=20 for traders who engage with a 4-digit broker.

The command parameter, Num_of_Buy, determines the total number of trades that will be opened immediately by the trader. The script file's innovation lies in its expediency, enabling traders to capitalize on market conditions swiftly and productively.

The fact that it considerably reduces the complexity of placing multiple buy orders, moreover, translates to considerable time savings -...

Read more...
πŸ‘7❀2
In the complex world of forex and crypto trading, fundamental insights could be unlocked using robust time-series techniques. Box and Jenkins' esteemed method of time series prediction proves to be a powerful tool despite latest advancements. The derived Autoregressive Integrated Moving Average (ARIMA) model, mastering temporal dependencies in data series, allows for efficient forecasts in the realm of non-stationary time series. By leveraging Powell's method of function minimization, this article crafts an ARIMA training algorithm using mql5 programming language.

A comprehensive overview of ARIMA model, along with its derivatives such as AR, MA, and ARMA, is provided for a better understanding of the forecasting strategies. A comprehensive methodology to calculate model coefficients and constant offset is also discussed.

The ARIMA training algorithm, encased in the CArima class, ...

Read more...
❀4πŸ‘4πŸ†1πŸ‘€1
A sharp look at an Expert Advisor (EA) for trading provides significant insight into its functioning. This specifically discusses an EA that only represents buy positions, refraining from the deployment of Stop Loss (SL) and Take Profit (TP) functionalities.

The focal setting parameters can be divided into two major sections for clarity. The first section comprises general settings, including instructions for starting trade, ending trade, and procedures for when an order is closed.

Risk management is given equal prominence with its own settings. The parameters include settings for the lot size, constraints on the number of open positions for each trading symbol, and a daily limit on the number of deals for every symbol.

The EA's efficacy was assessed using standard settings on a $10,000 account, equipped with a leverage of 100. Notably, the trading symbol being used in this scen...

Read more...
πŸ‘4
Investing time and effort in the development of a market simulation system is crucial for effective backtesting and trading practice. The introduction of Bid-based plotting systems has elicited new improvements needed, especially related to code duplication and tick volume errors.

Understanding and rectifying these issues can significantly enhance the simulator's functionality. Remember, a code that works effectively in particular situations but not in all does not meet the standard, necessitating meticulous debugging and amendments.

Moreover, by looking at the system flowchart, which is a great tool for accelerating coding, one can detect redundancy. Changes are undertaken to modify the tick reading code, avoiding code duplication and the resultant issues it may cause.

Another essential improvement aims at finding a solution for tick volume malfunctioning. Achieving this requir...

Read more...
❀5πŸ‘2
Financial markets, characterized by their multifaceted nature, are influenced by a multitude of factors that may include news, geopolitical events, technical elements, among others. While monitoring such markets, only a fraction of these influences is usually noticed. Adept recognition of main trends through dedicated tools becomes crucial, while other factors can be glossed over as stochastic noise. Reinforcement learning emerges as an indomitable tool for creating strategies in such complex environments. However, there are shortcomings with existing approaches like the Decision Transformer, which may struggle to adapt in variable stochastic atmospheres.

To address this, the Google team introduced the Dichotomy of Control (DoC) approach in October 2022. It is based on stoic principle of segregating elements under our control from those which are not. This algorithm thus comprehends...

Read more...
❀1πŸ‘1
Notwithstanding the broad disparity in trading models for the forex and stock markets, creating a replay/simulation program involves addressing several common complexities. In such programs, the use of price representation concepts is crucial. They often use Bid or Last as the underlying values. However, the issue arises in systems that use Bid as the base – whilst these work smoothly for the stock market, they fail to deliver consistent results in forex or any market following similar price representation principles. Fixing these issues requires a granular understanding of trading models and adjusting the program to handle different markets seamlessly.

Taking a closer look at the price representation in the stock market and forex, we find that the underlying values fluctuate between Bid and Last based on the particulars of the market. This difference necessitates the development of...

Read more...
❀2
Become familiar with a class that empowers developers to craft buttons on charts, behaving similarly to chart objects with time and price coordinates. These objects can be freely adjusted on the chart, maintaining their position even when scrolling.

For those keen to further their understanding of Object-Oriented Programming, chartevents management, or designing graphical interfaces, this resource proves invaluable. It cleverly responds to chart modifications and mouse maneuvers. When the mouse interacts under certain conditions, the Button is selected and becomes manipulable.

Watch as the dragging process is tracked through a custom chart event known as EVENT_DRAG. The button's onChartEvent function is consistently invoked in the built-in OnChartEvent function, relaying pertinent information to the various handler functions.

A tutorial video has been prepared, providing insights ...

Read more...
❀2πŸ‘2πŸ‘1
In the latest installment of our ongoing discussion on market simulation, the focus shifts to resolving issues related to extremely low transaction volumes. The primary concern was when such sparse data threatened the system's stability, especially during Last plotting type-based simulations.

The proposed solution, informed by previous principles used in Bid plotting-based simulations, features making integral changes to the class structure, enabling a more efficient aggregation of common values. This strategy facilitates the modification of code to remove existing limitations on Last price simulations and opens up a specific entry point for this simulation type.

The structural changes ensure that both simulation modes based on Bid and Last could benefit from improvements made to time management. Furthermore, the adjustments streamline the class code to allow for both simulations t...

Read more...
πŸ‘3
In the dynamic and highly unpredictable world of Forex trading, the influence of seasonal trends can often go unnoticed. Yet a deep analysis reveals clear patterns tied to long-term economic cycles, agricultural seasons and holiday periods, which can play a pivotal role in shaping trading strategies. This overlooked tool offers an opportunity for traders who are willing to move beyond the standard parameters of fundamental and technical analysis.

Seasonality represents a specific principle - a predictable formation of a market model depending on the time of year, repeating at regular intervals. Think about the regular increase in demand for heating oil during winter months, driving the price uptick, or the fluctuating supply and demand of soybeans attributed to agricultural cycles. Traders who can identify and understand these trends, real-time or across different years, will gain a...

Read more...
πŸ‘1
Confronted with the quest of understanding Object Oriented Programming or the workings of chartevents? Or perhaps, curious to innovate with graphical interfaces? A learning resource has been put together that focuses on a class designed to create buttons on a chart. These buttons, akin to chart objects, hold time and price coordinates.

Unique to this class is that the buttons can be dragged on the chart, and maintain their position through scrolling. The incorporated main Idea enables the class to react to chart changes and monitor mouse movements, allowing for interactivity.

Once the mouse matches the pre-set conditions, a button gets selected and becomes draggable, monitored via the custom chart event: EVENT_DRAG. An integral part of this setup is the button's onChartEvent function. This function, always activated in the built-in OnChartEvent mechanism, disseminates the necessar...

Read more...
πŸ‘7❀2πŸ‘1