MQL5 Algo Trading
391K subscribers
2.58K 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
From the school of Reinforcement Learning emerges a groundbreaking approach, the Nuclear Norm Maximization (NNM) method, cast into the spotlight by a recent technical paper "Nuclear Norm Maximization Based Curiosity-Driven Learning". This innovation strives to enhance the Agent's exploration of the environment. It intelligently utilizes nuclear norm maximization, which lends high immunity against noise and spikes for potent evaluation of environmental exploration novelty.

In application, the Matrix norms such as Nuclear Norm and others come into play in linear algebra along with computational methodologies. The Nuclear Norm of a matrix serves as a robust numerical determiner of the "size" of the matrix. The proposed NNM method considers the state's novelty by employing the nuclear norm of the matrix while lessening noise impacts.

The method introduces an internal reward equation t...

Read more...
πŸ‘3πŸ”₯3⚑2
Understanding the concepts of cosine distance and cosine similarity is of utmost importance in vector mathematics. Both concepts play pivotal roles in functions involving measurements in relation to vectors.

The cosine distance between two vectors A and B can be simply understood as (1 - CosineSimilarity).

Shedding some light on cosine similarity - it's fundamentally the measurement of the angle between the two vectors. Alternatively, one could apprehend it as the dot product of vectors divided by their magnitudes when multiplied.

In pursuit of better insight, there's a cogent explanation available, albeit with a minor discrepancy in the cos(45) calculation. Even with the minor error, the presented example manages to clarify the core idea.

Remember, a firm grasp of these concepts can present a gateway to deeper understanding of complex vector functions. Calculations involving co...

Read more...
πŸ‘8⚑4✍2πŸ‘Œ2
Explore the concept of Mean Reversion, a well-regarded contrarian trading principle, successful in predicting price return to a state of equilibrium. Grasp how to identify these shifts via market movement observations, utilizing central tendency statistics and algorithms aligning with quantitative methods.

Understand the mechanics of Mean Reversion - it's not simply a case of predicting rises and falls. Depending upon whether the current market price lies above or below the historical average, traders can anticipate either a rise or dip.

Reflect on the fact that Mean Reversion is not a short-term solution, it may indeed take years for asset classes or exchange rates to exhibit mean reversion. The key is recognizing signs of symmetry in stock fluctuations, forming a solid base for multiple trading strategies.

Despite its scientific semblance, mean reversion models do not incorpor...

Read more...
πŸ‘6
The "Strength Index Signal," a proprietary stock arrow indicator, promises to become a vital tool in traders' arsenals. Leveraging currency strength analysis, the indicator guides traders in making informed decisions, tipping the scales towards successful transactions in the volatile financial markets.

Crafted and honed over many years by a team of professional traders, the 'Strength Index Signal' stands as a testament to the confluence of experience and expertise. It's anticipated that this tool will play a key role in driving profitable trading strategies.

Ready to empower yourself with deeper market insights? Get acquainted with the "Strength Index Signal" today. No more swimming against the tide – make the market work for you.

Read more...
❀6πŸ‘6
Presenting an innovative way to create an interactive dashboard, enhancing the debugging and data visualization process for IT professionals and developers. The approach centers around developing a panel that can display specific data set by the developer, improving efficiency and convenience in displaying data on a chart and visual debugging. The core concept revolves around the use of classes for managing tabular data.

The proposed structure is a prototype terminal data window which can handle any amount of required data. Developers gain the freedom to add, sign, display, and update readings as per the needs of their code. The panel movement and its positioning on a chart, along with features like collapse, and expansion are flexible.

Moreover, the proposed panel design relies on the principle of tabular data positioning. It employs a grid system for its visual arrangement, cont...

Read more...
πŸ‘5
A new way to upgrade your experience in technical chart analysis! Just add the designated indicator to your chart and then save the template under the name "default." Going forward, all newly opened charts will automatically open up with this indicator pre-embedded, resulting in an efficient, streamlined process. Seize the opportunity to optimize your data visualization. For MT4 users, find the necessary code at the designated MT4 forum on mql5.com. Detailed instructions are available to ensure a smooth implementation experience. Be at the forefront of effective data representation. Remember, better visualization leads to improved decision making.

Read more...
πŸ‘9
Following the remarkable start to our journey into the sphere of MQL5 for algorithmic trading, brace yourselves for a deeper foray into its sublime intricacies. Part Two illuminates the significant aspects of this comprehensive programming language, aimed to foster an intuitive understanding even amongst non-programmers. Master the world of predefined variables - primed containers that encapsulate information about the state of the program, trading environment, or market conditions. Grasp the potency of common functions, the building blocks that make the automation of algorithmic trading a feasible reality. Unravel Arithmetic, Relational, and Logical Operations, the linchpin defining the functional interaction of code modules. The voyage continues, promising more insights into Expert Advisors, Strategy Testing, and much more. The goal remains clear - create a vibrant community, a know...

Read more...
❀4πŸ‘1
Understanding the nuts and bolts of the MQTT protocol in the context of a symmetric delivery mechanism, specifically PUBLISH packets, is crucial for efficient and reliable communication between IT systems. This detailed dissection of how PUBLISH packets function, are assigned, and how they interact with the rest of the system allows developers to gauge their impact on session state management. Critical features of MQTT protocol like RETAIN, QoS Level, and DUP are meticulously examined. Understanding the core semantics of these features is pivotal for optimal operational behavior of the system.

Further, comprehending the structure of the TCP/IP fixed header of an MQTT 5.0 PUBLISH packet, especially how RETAIN, QoS Level, and DUP flags are set/unset, is crucial. The text showcases how functions are reconfigured to manage PUBLISH packets' specificities and set the Publish Flags. This l...

Read more...
πŸ‘4❀3
Fostering the power of MetaTrader 5's historical backtesting tool isn’t just about harnessing predictive models, but also validating these. Tying your Expert Advisor (EA) with a well-theorised and validated strategy is a necessity to secure robustness.

By utilizing an array of libraries, backtesting on MetaTrader 5 can be achieved using multiple python-based solutions. However, the multi-faceted integration of python and MQL5 can become a cumbersome operation, potentially requiring the management of extensive projects. Overcoming this difficulty is attainable by using three different backtesting model methods, all within the MetaTrader 5 environment.

To demonstrate, consider the WebSocket method. It first attaches a web server instance to the python script and integrates our model inference. By crafting a web client in MQL5, the inference service in the server can be requested. This...

Read more...
πŸ‘5πŸ‘Œ2✍1❀1
An in-depth look at the Augmented Dickey-Fuller (ADF) test reveals that it is a key procedure used in determining whether a time series is stationary. While the test is commonly applied in finance, its principles are vital in crafting robust trading strategies. The ADF test evaluates the effectiveness of data transformations in achieving stationarity and aids in understanding the cointegration of different series.

In this content, we have focused on implementing the ADF test in pure MQL5. More interestingly, we have demonstrated its application in pinpointing cointegrated symbols in MetaTrader 5, especially in the area of time series analysis to ascertain unit root presence.

This update also delves into the understanding of a unit root in a sequential data set and some of the statistical dynamics that govern its existence. Furthermore, an outline of the ADF test implementation pro...

Read more...
πŸ‘3πŸ‘Œ2
Emerging in the Machine Learning field, glass-box algorithms offset the conventional wisdom about the tradeoff between prediction accuracy and interpretability. Unlike their black-box counterparts, these algorithms boast both unparalleled accuracy and transparency, making them significantly easier to debug, maintain, and improve.

Black-box models operate with complex inner workings that are not easily interpreted by humans, making them less than ideal for scenarios where a glass-box model can deliver the required accuracy. Recognizing the advantages of such transparent models, Microsoft Research team now maintains and updates a Python package known as Interpret ML. This comprises steamlined black-box explainers and glass-box models, both highly beneficial for any level of Machine Learning expertise.

One pitfall of black-box models is their susceptibility to the Disagreement Proble...

Read more...
πŸ‘2πŸ‘2
Struggles with making the Expert Advisor autonomously detect open orders are not uncommon among novice developers. The established OrdersTotal() function does not distinguish whether an order was generated manually or by an Expert Advisor, merely returning an aggregate count of open orders. A simple workaround code has been shared demonstrating the Check_Open_Orders function at work in real time. This code uses the Comment() function for this demonstration. Detailed explanatory notes accompany the codes further offering support in understanding the application. This code is intended to be beneficial for beginner developers faced with similar problems.

Read more...
πŸ‘7❀3✍1😁1
Grasping the elusive concept of dimensionality reduction in machine learning? Understand it better with an intelligent discussion on High Dimensional Data, Curse of Dimensionality, Truncated SVD, and NMF. This dissection makes it easier to understand the advantages, trade-offs, and challenges of using these techniques in different scenarios. SVD or NMF? Inside, find a comprehensive comparison between Truncated SVD and NMF, followed by discussions on their respective advantages, limitations, and computational efficiencies. Whether it's for improving the generalization of ML algorithms or simplifying the visualization of high-dimensional data sets, this study is a valuable resource for both seasoned developers and emerging talents in the tech world.

Read more...
πŸ‘6πŸ‘Œ1
This post includes an overview of two simple functions - pivothigh(source, leftbars, rightbars) and pivotlow(source, leftbars, rightbars), calculated based on Pine Script V4. These snippets are ideal for use in conversion projects from the TradingView platform to MQL4. Note that the pivot indicators implementation could be lagging within the TradingView platform. Click here to access the MQL4 version. By understanding these functions, developers can gain a comprehensive understanding of pivot indicators implementation.

Read more...
πŸ‘5❀2🀝2
Recent advancements in category theory application have been closely tethered to successful trading systems development. This discussion uncovers the potential of category theory graphs in the versatile trade system development framework, MQL5. Graphs can significantly improve modeling of intricate systems and enrich our understanding of relationships within.

Fronting categories for vertices and arrows with homomorphism functions provides an engaging way to define such systems. This method allows for detailed investigation of complex systems and examination of their components' relationships.

Two case studies have been utilized for this examination. The first study shows how changing graphs inform predictions about price changes, while the second study highlights the effects of different processes resulting from modifications in trading systems. The application and potential of the...

Read more...
πŸ‘5πŸ‘2
Expanding on standard market indicators, a newly devised strategy removes reliance on delayed data inputs, patterns, and price action projections, aiming to enhance trading efficacy.

The strategy employs an expert advisor (EA), utilizing a Progressive and Fibonacci system that has undergone rigorous testing for over three years. The EA operates independently of timeframe restrictions, making it adaptable across various trading windows.

Backtests have been conducted on pairs including GBPUSD and EURUSD from 2020.12.22 to 2023.12.22 with an initial deposit of 1000 USD, showcasing a reasonable degree of success. However, this EA is not meant for trending pairs like GBPJPY, USDJPY.

Key parameters for successful trading include specific initial lot size, defining maximum buy and sell orders, overall buy and sell profits, slippage control, and the distance between pips before triggering...

Read more...
πŸ‘4πŸ‘3
Continuous improvement lies at the core of all technological advancements. For scores of tech enthusiasts, the Automated System in the EA is nothing short of a prized tidbit. The latest article offers insight into the C_Automaton class application with just three models. Let's demystify all myths about the automation process.

Reinforcing the essentials from prior posts, this article intends to showcase the nuances of the adaptation process through practical examples. The focus is on how to tailor the C_Automaton class to suit your model. Examples include the 9-period exponential moving average, usage of RSI or IFR, and Moving Average crossover. Proceeding with the excursus, one can grasp several advanced concepts, such as how to add multiple indicators to the C_Automaton class.

Diving into details, the system utilizes the 9-period exponential moving average indicator based on the c...

Read more...
πŸ‘2❀1
A comprehensive guide to incorporating sound alerts into technical systems is now available. The process involves utilising wav files and storing them in the MQL5\Files\Sounds folder. Specific code has been provided along with a comprehensive explanation.

Further, the ready-to-use EA Utility file has been made available to ease the integration process. However, it's essential to note that some lines in the code are commented out due to limitations posed by the use of which restricts file uploads.

This technique represents a simple but effective way of improving system interaction to notify users of connection status changes. Incorporating sound alerts not only improves user experience but also contributes to efficient system operations. Implementing these presented steps can assist developers in introducing more responsive and interactive systems.

However, additional tweaks in the...

Read more...
πŸ”₯3❀2
Understanding the foundational aspects of scripting is crucial for seasoned developers. Here's an insight into the Pine Script V4 function with application in calculating Pivotshigh and Pivotslow based on Pine Script. These functions are straightforward, enabling seamless copy-paste for conversion projects from the TradingView platform. An important point to highlight is the lagging nature of the pivots indicators as implemented in the TradingView platform. Knowledge sharing is key to innovation in our field, ensuring we constantly improve and advance.

Read more...
πŸ‘10
The article sheds light on the enhancement of the CArima class, which is used for implementing ARIMA models, making it more accessible for forecasting. Delving into the intricate aspects of ARIMA models such as the importance of input data, how error series values impact predictions, and the influence of non-contiguous lags, the paper stresses the need for keen observation and precise calculations.

Further, it incorporates the complexities that arise due to differencing and the challenges faced when predicting far into the future. It introduces the feature of saving and loading the ARIMA models in Mql5 program for later usage. The added BIC and AIC methods allow for model selection by balancing goodness of fit and complexity, preventing overfitting.

The paper concludes with the implementation of predictions and suggests best practices for building effective autoregressive models i...

Read more...
πŸ‘3πŸ‘1