The art of IT problem-solving can be seen in the two phases of optimization problems: the problem formulation and solution. In the first phase, components include input variables, objective functions, and constraint functions. The second phase deals with the mathematical approach to find the solution using an optimization algorithm.
Input variables are the mutable components of the problem that can be adjusted for maximum efficiency. These can range from integer variables, real variables, and even Boolean variables. For instance, in expert advisors, variables could be the moving average period or the TP/SL ratio at entry.
Objective functions come into play when there are multiple goals for a given problem. The simplest method to combine these goals is by creating a weighted summation of each. In situations where there are multiple objective functions, it's important to normalize a...
Read more...
Input variables are the mutable components of the problem that can be adjusted for maximum efficiency. These can range from integer variables, real variables, and even Boolean variables. For instance, in expert advisors, variables could be the moving average period or the TP/SL ratio at entry.
Objective functions come into play when there are multiple goals for a given problem. The simplest method to combine these goals is by creating a weighted summation of each. In situations where there are multiple objective functions, it's important to normalize a...
Read more...
π6π1
In the realm of technical optimization, employing two separate algorithms can yield impressive efficacy and circumvent limitations. Scrutinizing the hybrid optimization algorithm BFO-GA offers profound insights. Here, the principles of foraging optimization (BFO), inspired by bacterial behaviors, coalesce with the genetic algorithm (GA), an echo of natural selection and genetics. BFO brings to the table swift convergence and effective local search capabilities, while GA handles global search competently. By unifying the two, BFO-GA aims to resolve certain limitations, with BFO undertaking global search and GA overseeing refinement of local optima.
BFO-GA successfully incorporates the selection, crossover, and mutation mechanisms of GA to extend its strikes, while leveraging bacterial swarming for optimal solution seeking. Utilization of the roulette method in the algorithm aids in p...
Read more...
BFO-GA successfully incorporates the selection, crossover, and mutation mechanisms of GA to extend its strikes, while leveraging bacterial swarming for optimal solution seeking. Utilization of the roulette method in the algorithm aids in p...
Read more...
π5
Taking a deeper analysis into the order system construction from a technical lens. In continuation from the previous article, here's a closer look into the last method in the C_Manager class and the EA code for implementation perspectives. Understanding how a system works in the current scenario is key for future developments and adaptations.
The functionality of the class C_Manager's function DispatchMessage as a cornerstone in the class development process is discussed. Detailed insights into the coding and sequence structures are provided. Including attention on aspects to prevent coding errors and their impacts.
In the C_Manager class's DispatchMessage method, a detailed explanation is provided about recursion and its rightful and wrongful use. The significance of this method and its functionality is emphasised, providing informative insights for new developers.
The article th...
Read more...
The functionality of the class C_Manager's function DispatchMessage as a cornerstone in the class development process is discussed. Detailed insights into the coding and sequence structures are provided. Including attention on aspects to prevent coding errors and their impacts.
In the C_Manager class's DispatchMessage method, a detailed explanation is provided about recursion and its rightful and wrongful use. The significance of this method and its functionality is emphasised, providing informative insights for new developers.
The article th...
Read more...
π9π1
Unveiling the fundamental strategy behind the QAlpha StockTrend product. Interested parties are encouraged to adapt and enhance this customisable tool as per their own requirements. The foundational strategy involves purchasing/covering immediately when prices surge past an 'n' bar high, and selling/shorting instantly when prices plummet below an 'n' bar low. This strategy has been backtested in the context of USDJPY trends from 2013-2023. Looking forward to observing if the curated deciphering tools can enable users to enrich these outcomes further. The strategy can be accessed via this link: https://www.mql5.com/en/market/product/114875. Be proactive and dare to innovate.
Read more...
Read more...
π7π1
A new article focusing on enhancing the market replay service was just released. The text presents solutions to an existing user interface problem, primarily involving the account types detected by the EA (Expert Advisor). However, issues still persist with the replay/simulation system, particularly the inability to accurately report the account type attached to an asset. Techniques to resolve this while also making use of the MetaTrader 5 platform functionalities are elaborated on.
Unanswered is the recurring question - how to transmit this account type information into the EA? A viable solution appears to be through the use of an 8-byte block enabled terminal global variable. This solution is reliant on the peculiarities of the MQL5 language, highlighting the challenge of programming within its constraints.
The article then proposes enriching the replay/simulation system function...
Read more...
Unanswered is the recurring question - how to transmit this account type information into the EA? A viable solution appears to be through the use of an 8-byte block enabled terminal global variable. This solution is reliant on the peculiarities of the MQL5 language, highlighting the challenge of programming within its constraints.
The article then proposes enriching the replay/simulation system function...
Read more...
π6π1
Trading volatility remains a critical aspect of successful financial market operations. Today, attention is focused on the Chaikin Volatility (CHV) technical indicator. This piece delves into understanding the application of the CHV.
CHV is instrumental in measuring market volatility and may signal possible reversals. Its effectiveness can be further enhanced when used with other technical tools.
Starting with understanding the CHV's calculation, the discussion progresses toward the creation of a custom CHV indicator using MQL5-- a requisite for optimizing trading system performance.
Following this, different trading strategies are examined, including the exclusive use of CHV and integrating with other indicators. Examples include CHV crossover and CHV and MA crossover strategies.
It is worth noting that tweaking the CHV indicator, incorporating it into tailored trading systems...
Read more...
CHV is instrumental in measuring market volatility and may signal possible reversals. Its effectiveness can be further enhanced when used with other technical tools.
Starting with understanding the CHV's calculation, the discussion progresses toward the creation of a custom CHV indicator using MQL5-- a requisite for optimizing trading system performance.
Following this, different trading strategies are examined, including the exclusive use of CHV and integrating with other indicators. Examples include CHV crossover and CHV and MA crossover strategies.
It is worth noting that tweaking the CHV indicator, incorporating it into tailored trading systems...
Read more...
π5π1
Unlocking the potential of the immune system as an optimization mechanism can solve complex problems. This is the principle behind the Artificial Immune System (AIS) optimization method. The approach employs concepts of antigens (inputs), antibodies (solutions), and killer cells (optimization processes). Devised in the 1990s, it has been subject to constant growth and development, enhanced by variations and alterations.
Micro-AIS, a recent modification, uses simplified models and processing operations of normal AIS. Its strength lies in bringing ease to implementation. However, more complex problems may require a comprehensive immune system model.
Micro-AIS measures affinity, the similarity between antibodies and antigens, which acts as an indication of suitability. Higher affinity antibodies are selected for new antibody creation, though experiments have shown using the fitness fun...
Read more...
Micro-AIS, a recent modification, uses simplified models and processing operations of normal AIS. Its strength lies in bringing ease to implementation. However, more complex problems may require a comprehensive immune system model.
Micro-AIS measures affinity, the similarity between antibodies and antigens, which acts as an indication of suitability. Higher affinity antibodies are selected for new antibody creation, though experiments have shown using the fitness fun...
Read more...
π7β€2π1π€£1
Continuing the journey of debugging and rectifying a complex replay system in a development environment poses intricate challenges. A system replete with mysterious bugs has been put under scrutiny, with notable anomalies associated with pointer operations and recursion in the context of C and C++ languages.
Minor modifications yielded a solution for one fault, although it is deemed necessary to extend revisions to ensure smooth operation of the program. Failure diagnosis revealed that the errors are associated with newer additions to the program, with their effects becoming apparent with increased usage.
The 'Service Busy' indicator glitch was rectified by implementing minor changes, avoiding the approach of turning a blind eye by removing the indicator altogether. As an alternative, minor code changes yield the desired results, without creating substantial implications on the pr...
Read more...
Minor modifications yielded a solution for one fault, although it is deemed necessary to extend revisions to ensure smooth operation of the program. Failure diagnosis revealed that the errors are associated with newer additions to the program, with their effects becoming apparent with increased usage.
The 'Service Busy' indicator glitch was rectified by implementing minor changes, avoiding the approach of turning a blind eye by removing the indicator altogether. As an alternative, minor code changes yield the desired results, without creating substantial implications on the pr...
Read more...
π6π2π1
Running scripts regularly is part of the developer's life. Scripts executed on the W1 and D1 timeframes can offer unique insights. The result of these scripting processes should be noted not only on the D1 timeframe but also on the M15 interval. The multiple perspectives allow a more thorough survey of the data. It aids in cross-analyzing the accurate calibration and efficiency of the scripts. Keep tabs on the outcomes across distinct periods to fine-tune script performance, ensuring optimal results.
Read more...
Read more...
π5π4β3π2β€1
Understanding reinforcement learning is crucial to developing optimal behavior policies within an exploratory environment. A key challenge that lies within this approach is the creation of an appropriate reward function, which typically demands significant human effort. The authors of "Beyond Reward: Offline Preference-guided Policy Optimization" have proposed an innovative solution to this problem with the Offline Preference-guided Policy Optimization method or OPPO. The OPPO method eliminates the requirement of traditional rewards and replaces it with the preferences of a human annotator between two environment trajectories.
The OPPO algorithm is a one-step method that models offline preferences and learns optimal decision policy without requiring separate reward function training. This is achieved by using two key factors of capturing information during the absence of offline dat...
Read more...
The OPPO algorithm is a one-step method that models offline preferences and learns optimal decision policy without requiring separate reward function training. This is achieved by using two key factors of capturing information during the absence of offline dat...
Read more...
π8β€1π1
Unveiling a novel indicator with the capability to draw three separate line plots on a single chart. Using this tool, the current period is automatically detected, and the user has the convenience of designating two additional periods for comparison purposes. It's a valuable tool when the price direction does not align across the selected timeframes.
Coinciding with this divergence, the lines will separate, which illustrates a lack of harmony or confluence across the timeframes. This discrepancy can serve as an indicator to abstain from trading activity during such periods. The rule of thumb is to engage in trading when there's substantial confluence among multiple timeframes.
The first plot is the depiction of a line chart established on the closing prices of the current timeframe. In contrast, the second and third plots represent the deviation of the first and second input timefr...
Read more...
Coinciding with this divergence, the lines will separate, which illustrates a lack of harmony or confluence across the timeframes. This discrepancy can serve as an indicator to abstain from trading activity during such periods. The rule of thumb is to engage in trading when there's substantial confluence among multiple timeframes.
The first plot is the depiction of a line chart established on the closing prices of the current timeframe. In contrast, the second and third plots represent the deviation of the first and second input timefr...
Read more...
π3β€1π1
The QuickTradeKeys 123 Expert Advisor (EA) provides a swift market response facilitator. It allows the ability to conduct trades directly from the chart view using a single keystroke. With Key '1' opening a buy position, Key '2' a sell position, and Key '3', closing all open positions the EA has initiated via a particular magic number.
Ease of use is one of the main features of this tool. It caters to both novices looking to get their feet wet in the trading world and seasoned traders desiring efficient trade control.
The application sphere for this EA spans across all currency pairs and timeframes. However, to ensure swift execution, access to a low spread and smooth market is crucial.
Installation is simple enough: dragging the EA onto the chart of choice, ensuring that automated trading is activated in MetaTrader, then authorizing the EA to conduct trades seals the deal. Fine-tu...
Read more...
Ease of use is one of the main features of this tool. It caters to both novices looking to get their feet wet in the trading world and seasoned traders desiring efficient trade control.
The application sphere for this EA spans across all currency pairs and timeframes. However, to ensure swift execution, access to a low spread and smooth market is crucial.
Installation is simple enough: dragging the EA onto the chart of choice, ensuring that automated trading is activated in MetaTrader, then authorizing the EA to conduct trades seals the deal. Fine-tu...
Read more...
π3π2
Assess the key difference between classic trailing and virtual trailing: the former leverages Stop Loss for trailing, which corresponds on your broker server; the latter does not make use of Stop Loss for trailing and is not reflected in the broker's system.
Understanding trailing gaps is also critical; this refers to the difference from current Bid/Ask Price. Equally, comprehend the concept of a trailing start β the distance from the original order entry price (Order Open Price), at which a new trailing begins.
As a seasoned developer deconstructing these trading algorithms, fine-tuning and understanding their nuances are integral to enhancing performance potential. With the correct approach to these parameters, one can have better control over their trade and potentially elevate their trading to the next level.
Read more...
Understanding trailing gaps is also critical; this refers to the difference from current Bid/Ask Price. Equally, comprehend the concept of a trailing start β the distance from the original order entry price (Order Open Price), at which a new trailing begins.
As a seasoned developer deconstructing these trading algorithms, fine-tuning and understanding their nuances are integral to enhancing performance potential. With the correct approach to these parameters, one can have better control over their trade and potentially elevate their trading to the next level.
Read more...
π5β€4π2π1
New methods in category theory analysis are emerging - recent studies have focused on how equalizers can be applied in MQL5 for optimizing trading strategies. By examining 'common behavior' in parallel morphisms, traders can utilize equalizers to better understand their strategic outcomes and enhance their overall performance.
Additional concepts from category theory, such as reflexivity, symmetry, and transitivity, have provided a fresh lens for understanding forex trading. Turbulent changes in the volume or nature of trading can be explained using these principles, providing a more comprehensive view of fluctuations in currency rates or trading positions. For instance, the interest rate parity theory suggests the existence of transitive equivalence between different countries' currencies.
The essence of equalizers lies in their ability to dissect complex systems for more in-dept...
Read more...
Additional concepts from category theory, such as reflexivity, symmetry, and transitivity, have provided a fresh lens for understanding forex trading. Turbulent changes in the volume or nature of trading can be explained using these principles, providing a more comprehensive view of fluctuations in currency rates or trading positions. For instance, the interest rate parity theory suggests the existence of transitive equivalence between different countries' currencies.
The essence of equalizers lies in their ability to dissect complex systems for more in-dept...
Read more...
π7β€4π1π1
An Expert Advisor (EA) has been recently upgraded to offer a broader range of functionality. Designed for currency pair modifications, the EA permits changes to the variable values related to Take Profit (TP), Stop Loss (SL), Trailing, Closing, among others.
It's noteworthy that the EA doesn't operate on specific Magic Numbers, a feature that makes it adaptable to orders placed via mobile devices.
Modified features of this EA are noteworthy. The layout is divided into three strategically organized buttons. It enables automatic closure of all orders upon achieving the set profit, subject to the parameter values under "CLOSE IF PROFIT-xxxx". An input of 0 implies non-activation, while a value of 100.0 prompts the orders to close automatically upon reaching a profit of $100.
In contrast, orders automatically close upon reaching a deficit determined by the input under "CLOSE IF LOSS-xx...
Read more...
It's noteworthy that the EA doesn't operate on specific Magic Numbers, a feature that makes it adaptable to orders placed via mobile devices.
Modified features of this EA are noteworthy. The layout is divided into three strategically organized buttons. It enables automatic closure of all orders upon achieving the set profit, subject to the parameter values under "CLOSE IF PROFIT-xxxx". An input of 0 implies non-activation, while a value of 100.0 prompts the orders to close automatically upon reaching a profit of $100.
In contrast, orders automatically close upon reaching a deficit determined by the input under "CLOSE IF LOSS-xx...
Read more...
π5β€1π1
In an incisive examination, this article outlines the value of leveraging candlestick patterns in automated trading. Understanding the patterns of candlesticks can assist in predicting potential market movements. The article delves into specific single and blended candle patterns, and how to apply MQL5 for auto-detection of these patterns in MetaTrader 5.
It emphasizes the importance of using these patterns in synergy with other technical tools to generate credible signals. This includes integrating Doji and Hammer patterns in diverse timeframes. The ability to write a program that can continuously monitor Doji patterns is explored, underlining it as an essential part of an effective trading system.
Notably, the Hammer pattern analysis demonstrates that candlestick appearances can vary significantly across multiple timeframes. Therefore, these patterns become particularly meaningful...
Read more...
It emphasizes the importance of using these patterns in synergy with other technical tools to generate credible signals. This includes integrating Doji and Hammer patterns in diverse timeframes. The ability to write a program that can continuously monitor Doji patterns is explored, underlining it as an essential part of an effective trading system.
Notably, the Hammer pattern analysis demonstrates that candlestick appearances can vary significantly across multiple timeframes. Therefore, these patterns become particularly meaningful...
Read more...
π8π2
A focused approach towards extracting the most recent closed trade data can be achieved with the given block of code, eliminating the need for operating in leveraged loops. Optimization may be realized through the establishment of a specific variable assigning the start time of the present day, although this step remains optional. Further optional enhancements include the institution of supplementary variables destined for chart output curation and the generation of additional code blocks.
To witness the results in real time, it is suggested that this code be applied within the OnTick() function which will display outcomes with every tick occurrence. However, this restriction can be modified to make an appearance once per bar, as per user preferences.
Moreover, a comprehensive study of the entire trading history, right from inception, may be procured through the effective usage of...
Read more...
To witness the results in real time, it is suggested that this code be applied within the OnTick() function which will display outcomes with every tick occurrence. However, this restriction can be modified to make an appearance once per bar, as per user preferences.
Moreover, a comprehensive study of the entire trading history, right from inception, may be procured through the effective usage of...
Read more...
π9β€3π2
Examining a vexing challenge when working with MetaTrader 5: causing changes in element behavior using MQL5. The goal is to share avenues of transformation on source code allowing modularity in the system. The coding journey presented is not a bed of roses; the codes viewed are mere modifications and not original versions. The crossroad in sight: revealing unaltered coding or a variation closer to the daily use; otherwise, the future of the replay/simulation system project is uncertain.
Solving this challenge doesn't solely involve writing codeβit entails instilling knowledge enabling you not only to utilize the system but also modify it, honing it to meet your needs. Thus, granting you the power to conduct your analysis independently. The beauty of this step-by-step process manifests in the tailored behavior of the programming and the creation of a comprehensive system using a low n...
Read more...
Solving this challenge doesn't solely involve writing codeβit entails instilling knowledge enabling you not only to utilize the system but also modify it, honing it to meet your needs. Thus, granting you the power to conduct your analysis independently. The beauty of this step-by-step process manifests in the tailored behavior of the programming and the creation of a comprehensive system using a low n...
Read more...
π9π2
A fresh take on the tried-and-true Relative Strength Index (RSI) is available to discerning developers. Utilizing the underlying principles intrinsic to RSIβs functionality, it focuses primarily on depicting accurate market momentum.
However, the distinctive forte of this revamped indicator is its capacity to filter out market noise that commonly triggers false signals. Its refined ability promises to pinpoint only authentic market fluctuations, thereby boosting its dependability.
Usage guide: Employ this advanced indicator akin to a traditional RSI - identify divergences, train it on upward/downward movements or harness its prowess to highlight oversold/overbought terrains.
A couple of professional suggestions: Opt for custom adjustments to the Signal Period and Rate of Change Period based on personal strategy. Rigorous back testing is recommended prior to deploying it live. Al...
Read more...
However, the distinctive forte of this revamped indicator is its capacity to filter out market noise that commonly triggers false signals. Its refined ability promises to pinpoint only authentic market fluctuations, thereby boosting its dependability.
Usage guide: Employ this advanced indicator akin to a traditional RSI - identify divergences, train it on upward/downward movements or harness its prowess to highlight oversold/overbought terrains.
A couple of professional suggestions: Opt for custom adjustments to the Signal Period and Rate of Change Period based on personal strategy. Rigorous back testing is recommended prior to deploying it live. Al...
Read more...
π7β€3
Expanding on the prior discussion of APIs and RestAPIs, the forthcoming content applies these principles to a practical example: developing functions in MQL5 for HTTP calls, and integrating these with RestAPI capabilities for efficient interaction with an external environment. To further illustrate these concepts, a Python Tic-Tac-Toe game serves as the example. Crucial MQL5 functions will be established to effect communication with the game's Python API. This will further be supplemented by discussion on API development via FastAPI and the application of a test script in MQL5 for interaction with the gameβs API.
This final step brings the entire process, from theoretical concept to the practical application, together to demonstrate the applicability of these technologies in the building of innovative solutions. This is part of a wider exploration of the role of MQL5 functions and Fa...
Read more...
This final step brings the entire process, from theoretical concept to the practical application, together to demonstrate the applicability of these technologies in the building of innovative solutions. This is part of a wider exploration of the role of MQL5 functions and Fa...
Read more...
π8π1