In the realm of automated trading, understanding triggersβthough complexβis crucial for developing effective trading strategies using Expert Advisors (EAs). Triggers, which signal various trading actions such as opening or closing positions, are integral in navigating the volatile trading environment but they come with inherent risk. Issues of reliability make it imperative to approach triggers with caution to avoid missed opportunities or substantial losses.
Transitioning from fundamental order systems discussed previously, the attention now shifts to advanced implementation techniques for EAs, specifically focusing on manual interaction and event-driven strategies. Among these methods, manipulating mouse and keyboard events to generate trading orders presents its own set of challenges. The simplicity of such methods is deceptive; they necessitate a high level of precision in coding...
Read more...
Transitioning from fundamental order systems discussed previously, the attention now shifts to advanced implementation techniques for EAs, specifically focusing on manual interaction and event-driven strategies. Among these methods, manipulating mouse and keyboard events to generate trading orders presents its own set of challenges. The simplicity of such methods is deceptive; they necessitate a high level of precision in coding...
Read more...
π5π3π2β€1
An implementation of the original Average True Range (ATR) indicator, as developed by John Welles Wilder Jr. and detailed in his 1978 book, "New Concepts in Technical Trading Systems," is now available. This version employs the Wilderβs Moving Average (SMMA) rather than the Simple Moving Average (SMA) commonly used in standard ATR indicators. Here, the period set by default is 7 days, aligning with Wilder's original specifications instead of the commonly used 14-day period.
The indicator is compatible with both MQL4 and MQL5, thanks to the use of conditional compilation. Additionally, the source code for this and other related tools can be found under the 'Public Projects' section in the MetaEditor, grouped under the project name "FMIC." This allows developers and technical analysts to access and integrate these tools in their trading systems effectively.
Read more...
The indicator is compatible with both MQL4 and MQL5, thanks to the use of conditional compilation. Additionally, the source code for this and other related tools can be found under the 'Public Projects' section in the MetaEditor, grouped under the project name "FMIC." This allows developers and technical analysts to access and integrate these tools in their trading systems effectively.
Read more...
π7π3π1
The invasive weed metaheuristic algorithm stands as a notable technique in the field of optimization algorithms. Originating from the resilience and adaptability of weed species, this approach simulates weed population dynamics to solve optimization problems effectively. This algorithm is especially relevant for scenarios where solutions need exploration across a broad and varied landscape, akin to weeds spreading across a field.
In technical terms, this algorithm initializes with a random distribution of 'seeds'βpotential solutionsβacross the problem space. Each seed grows into a 'weed', where its fitness is calculated based on the optimization criteria. Weeds with higher fitness scores produce more seeds, thus propagating their traits more extensively in the next generation. The process iterates, continually refining solutions until optimal or near-optimal solutions emerge.
This m...
Read more...
In technical terms, this algorithm initializes with a random distribution of 'seeds'βpotential solutionsβacross the problem space. Each seed grows into a 'weed', where its fitness is calculated based on the optimization criteria. Weeds with higher fitness scores produce more seeds, thus propagating their traits more extensively in the next generation. The process iterates, continually refining solutions until optimal or near-optimal solutions emerge.
This m...
Read more...
π8π3
The indicator presented provides a precise implementation of John Welles Wilder Jr.'s Original Average True Range (ATR) from his seminal 1978 publication, New Concepts in Technical Trading Systems. It utilizes Wilder's moving average, specifically the smoothed moving average (SMMA), for greater accuracy compared to the commonly used simple moving average (SMA).
Notably, this indicator is configured with a default period of 7 rather than the traditional 14, aligning closely with Wilder's specifications. The coding is versatile, allowing compilation in both MQL4 and MQL5 environments, ensuring broad compatibility.
For developers interested in accessing the source code, it is now available under the "Public Projects" tab of MetaEditor, labeled as βFMICβ. This resource offers a valuable tool for those looking to integrate a foundational technical analysis element into their trading stra...
Read more...
Notably, this indicator is configured with a default period of 7 rather than the traditional 14, aligning closely with Wilder's specifications. The coding is versatile, allowing compilation in both MQL4 and MQL5 environments, ensuring broad compatibility.
For developers interested in accessing the source code, it is now available under the "Public Projects" tab of MetaEditor, labeled as βFMICβ. This resource offers a valuable tool for those looking to integrate a foundational technical analysis element into their trading stra...
Read more...
β€11π2
Machine learning in electronic trading has evolved to enhance strategy performance, particularly through focusing on technical indicator values rather than direct price forecasts. A study underscores the limitations of achieving over 50% accuracy in security price prediction. By switching the focus to technical indicators, accuracy can improve up to approximately 70%. This approach utilizes comprehensive data fetched and analyzed using Python and MetaTrader 5, demonstrating a more reliable method by fully accounting for variables influencing technical indicators.
Analysis reveals a stark contrast in the effectiveness of predicting price movements versus technical indicators. Modelling focuses on factors fully observable within technical indicators, fundamentally boosting prediction accuracy. This methodology leverages historical data processing and Principal Components Analysis (PCA)...
Read more...
Analysis reveals a stark contrast in the effectiveness of predicting price movements versus technical indicators. Modelling focuses on factors fully observable within technical indicators, fundamentally boosting prediction accuracy. This methodology leverages historical data processing and Principal Components Analysis (PCA)...
Read more...
β€5π3
In the realm of intraday trading with multiple instruments, the simultaneous balancing of risks associated with each symbol's tick price and average daily volatility is paramount. Addressing this, one approaches the establishment of a proper balancing mechanism that serves to normalize profits and safeguard the trading portfolio.
The tick price, defined by the minimum price fluctuation within a currency, varies notably between instruments, demanding precise considerations during trade setups. For instance, EURGBP and AUDNZD exhibit different tick values reflecting volatility and trading dynamics.
Moving beyond simple price movements, average daily volatility adds another layer of risk assessment. Trading decisions require a solid understanding of how intraday price fluctuations can affect trade outcomes. Differences in volatility like those between EURGBP and CHFJPY significantly in...
Read more...
The tick price, defined by the minimum price fluctuation within a currency, varies notably between instruments, demanding precise considerations during trade setups. For instance, EURGBP and AUDNZD exhibit different tick values reflecting volatility and trading dynamics.
Moving beyond simple price movements, average daily volatility adds another layer of risk assessment. Trading decisions require a solid understanding of how intraday price fluctuations can affect trade outcomes. Differences in volatility like those between EURGBP and CHFJPY significantly in...
Read more...
π4π₯1π1
A trading strategy focusing on the EURUSD pair during the M15 timeframe has been outlined for traders interested in technical analysis. The strategy utilizes a set of three indicators: EMA with a period of 34, CCI with an MA period of 50, and the MACD set to default MT5 settings.
For executing BUY orders under this strategy, the conditions are specified as follows: the closing of the candle above the EMA, the CCI indicator crossing the 0 level moving into the positive zone, and the MACD indicator positioned below 0 while completing a bullish crossover.
Conversely, SELL orders should be considered when the candle closes above the EMA, the CCI indicator surpasses the 0 level moving into the positive, and the MACD indicator remains below 0, indicating a bearish crossover.
This systematic approach provides a clear framework for traders looking to harness the combined predictive powers ...
Read more...
For executing BUY orders under this strategy, the conditions are specified as follows: the closing of the candle above the EMA, the CCI indicator crossing the 0 level moving into the positive zone, and the MACD indicator positioned below 0 while completing a bullish crossover.
Conversely, SELL orders should be considered when the candle closes above the EMA, the CCI indicator surpasses the 0 level moving into the positive, and the MACD indicator remains below 0, indicating a bearish crossover.
This systematic approach provides a clear framework for traders looking to harness the combined predictive powers ...
Read more...
π8β€1π1
Understanding the application of Hidden Markov Models (HMMs) in financial series heralds a significant leap in predictive modeling. HMMs classify temporal data points into hidden states based on the transition probabilities and emission probabilities, making them ideal for financial time series marked by noise and non-linearities.
This primer details the use of Python's hmmlearn module to construct an HMM, alongside an integration example with MetaTrader 5 via both Python and MQL5. Key aspects of modeling with HMMs include defining the number of latent states, setting initial state probabilities, transitioning probabilities matrix, and defining emission probabilities. Techniques such as the forward and backward algorithms are used for likelihood estimations across observed data sequences, while the Viterbi algorithm assists in determining the most likely hidden state sequences.
For...
Read more...
This primer details the use of Python's hmmlearn module to construct an HMM, alongside an integration example with MetaTrader 5 via both Python and MQL5. Key aspects of modeling with HMMs include defining the number of latent states, setting initial state probabilities, transitioning probabilities matrix, and defining emission probabilities. Techniques such as the forward and backward algorithms are used for likelihood estimations across observed data sequences, while the Viterbi algorithm assists in determining the most likely hidden state sequences.
For...
Read more...
π7π1
Expert Advisor developers often encounter the need for their robots to manage multiple orders simultaneously. Achieving this requires the ability to track the total number of open orders and distinguish among them by type. A practical solution involves using the Comment() function, allowing for real-time visual tracking of the order count managed by the robot. This approach is illustrated in a clear and concise code, complete with descriptive notes to aid in implementation. This kind of capability is crucial for developers looking to enhance the functionality and efficiency of their trading strategies.
Read more...
Read more...
π4π3
In developing efficient trading strategies, it's essential to incorporate comprehensive market analysis and predictive techniques for financial instrument movements. These movements typically exhibit correlations with other financial assets and macroeconomic indicators, revealing patterns akin to regulated traffic dynamics, where various elements interact within defined rules, albeit with inherent unpredictability due to individual actions.
The ADAPT method, initially introduced for navigating autonomous vehicles, has been effectively adapted for financial markets. This technique involves analyzing past data to predict future trajectories of multiple agents by dynamically learning weight adjustments. It employs a vectorized scene representation to model interactions among agents and map elements which aids in accurately forecasting movements within the financial landscape.
Key eleme...
Read more...
The ADAPT method, initially introduced for navigating autonomous vehicles, has been effectively adapted for financial markets. This technique involves analyzing past data to predict future trajectories of multiple agents by dynamically learning weight adjustments. It employs a vectorized scene representation to model interactions among agents and map elements which aids in accurately forecasting movements within the financial landscape.
Key eleme...
Read more...
π8π3
In the evolution of multi-currency EA development, a transition into a more sophisticated operational mode has been noted. Initially, the CAdvisor class facilitated the aggregation of multiple trading strategies into a single array, which enabled simultaneous operations but introduced complexities, such as the need for smaller position sizes and the possibility of canceling out opposing positions. To address these issues, a significant restructuring was implemented.
In the updated model, direct market position openings by individual strategies were removed. Instead, strategies now manage virtual positions while a dedicated receiver (CReceiver class and descendants) handles the actual market transactions. This change ensures that even strategies contributing minimal virtual volumes can influence the market, enhancing operational inclusivity and potentially reducing swap costs and draw...
Read more...
In the updated model, direct market position openings by individual strategies were removed. Instead, strategies now manage virtual positions while a dedicated receiver (CReceiver class and descendants) handles the actual market transactions. This change ensures that even strategies contributing minimal virtual volumes can influence the market, enhancing operational inclusivity and potentially reducing swap costs and draw...
Read more...
β€4π2π₯1π1
In the realm of MQL5 development, efficient code management is critical, especially when dealing with repetitive tasks across multiple projects. A powerful strategy to streamline this process is by utilizing code libraries, particularly .ex5 libraries and DLLs, which are essential for developing Expert Advisors, custom indicators, and scripts on the MetaTrader 5 platform.
Creating your own MQL5 libraries not only accelerates the development cycle by reusing existing code but also protects your source code through encapsulation, ensuring that functionalities can be shared without exposing the underlying code implementations. Function libraries (.ex5 files) allow for modular design, enhancing code reusability and maintenance.
For more advanced integration, MQL5 developers can leverage third-party C++ libraries or expand functionalities with .NET Libraries and Python modules, seamlessl...
Read more...
Creating your own MQL5 libraries not only accelerates the development cycle by reusing existing code but also protects your source code through encapsulation, ensuring that functionalities can be shared without exposing the underlying code implementations. Function libraries (.ex5 files) allow for modular design, enhancing code reusability and maintenance.
For more advanced integration, MQL5 developers can leverage third-party C++ libraries or expand functionalities with .NET Libraries and Python modules, seamlessl...
Read more...
π2β1π1π1
Discussing the Break of Structure (BoS) in Forex Trading
The Break of Structure (BoS) represents a significant shift in the market trend and is pivotal in understanding forex market movements through the lens of Smart Money Concepts (SMC). In technical analysis, a Break of Structure occurs when prices decisively move through established swing highs or lows, indicating a potential change in market sentiment and trend direction.
By contrasting BoS with Market Structure Shift (MSS) and Change of Character (CHoC), traders can better grasp different market dynamics. MSS signals a trend reversal without previous breaks of swing points, while CHoC involves a price break after surpassing the former swing points.
Incorporating BoS into trading strategies involves analyzing higher time frames to discern the broader market trend and pinpointing entry points at the break of swing highs or lows...
Read more...
The Break of Structure (BoS) represents a significant shift in the market trend and is pivotal in understanding forex market movements through the lens of Smart Money Concepts (SMC). In technical analysis, a Break of Structure occurs when prices decisively move through established swing highs or lows, indicating a potential change in market sentiment and trend direction.
By contrasting BoS with Market Structure Shift (MSS) and Change of Character (CHoC), traders can better grasp different market dynamics. MSS signals a trend reversal without previous breaks of swing points, while CHoC involves a price break after surpassing the former swing points.
Incorporating BoS into trading strategies involves analyzing higher time frames to discern the broader market trend and pinpointing entry points at the break of swing highs or lows...
Read more...
π6β3π2
In the dynamic world of technical trading, the clarity of chart visualization is critical. MQL5 on MetaTrader 5 offers a variety of drawing styles that significantly enhance this aspect, providing traders with tools necessary for sophisticated analysis and effective trading strategy development. Traders can customize these styles, like DRAW_LINE or DRAW_HISTOGRAM, to suit distinct needs, be it to track volume or highlight trend lines and moving averages more clearly.
Further enhancing its utility, MQL5 allows for the integration of detailed visual cues into trading systems, thereby reducing manual chart monitoring and enabling more efficient trades. An example of this is the implementation of the DRAW_LINE function, used to visually depict trends and modify its display attributes in response to changing market conditions.
Moreover, the adaptability of MQL5's drawing functions exten...
Read more...
Further enhancing its utility, MQL5 allows for the integration of detailed visual cues into trading systems, thereby reducing manual chart monitoring and enabling more efficient trades. An example of this is the implementation of the DRAW_LINE function, used to visually depict trends and modify its display attributes in response to changing market conditions.
Moreover, the adaptability of MQL5's drawing functions exten...
Read more...
π6π3
A new chart indicator is now available, offering enhanced trading visualization features. Key functionalities include:
- Real-time display of the last price on the Bid Line, together with the symbol name, countdown to candle closing, and current timeframe.
- Presentation of the last 24 hours' percentage change for quick volatility assessment.
- Customizable time display on the Price Line, allowing traders to choose between Local, GMT, or the Current time based on their specific chart setups. Additionally, it shows the current symbol number in relation to the total symbols listed in Marketwatch.
- Indicator settings now allow users to assign specific colors to bearish and bullish movements, enhancing visual differentiation.
- The display of current High and Low prices within the visible chart area. Users can scale the chart vertically using the mouse scroll button, incorporating a fea...
Read more...
- Real-time display of the last price on the Bid Line, together with the symbol name, countdown to candle closing, and current timeframe.
- Presentation of the last 24 hours' percentage change for quick volatility assessment.
- Customizable time display on the Price Line, allowing traders to choose between Local, GMT, or the Current time based on their specific chart setups. Additionally, it shows the current symbol number in relation to the total symbols listed in Marketwatch.
- Indicator settings now allow users to assign specific colors to bearish and bullish movements, enhancing visual differentiation.
- The display of current High and Low prices within the visible chart area. Users can scale the chart vertically using the mouse scroll button, incorporating a fea...
Read more...
π6π3β€1
In the dynamic field of trajectory forecasting, particularly for real-time applications such as trading and autonomous driving, the balance between model complexity and computational efficiency is crucial. Increasing model complexity can improve accuracy but also raises operating and training costs. This is especially significant in volatile markets where real-time decision-making is essential.
Researchers have derived methodologies from autonomous vehicle technologies to address these challenges. By adopting techniques like graph neural networks and attention mechanisms, they have managed to reduce computational demands without sacrificing forecast quality. The focus is on predictive models that use simplified input data, such as past trajectories and basic map information, avoiding the need for high-quality, fully annotated maps.
The proposal involves lightweight model architectur...
Read more...
Researchers have derived methodologies from autonomous vehicle technologies to address these challenges. By adopting techniques like graph neural networks and attention mechanisms, they have managed to reduce computational demands without sacrificing forecast quality. The focus is on predictive models that use simplified input data, such as past trajectories and basic map information, avoiding the need for high-quality, fully annotated maps.
The proposal involves lightweight model architectur...
Read more...
π4π1
Understanding the structure and workflow of an Expert Advisor (EA) in automated trading can significantly enhance your development process. Here's a brief breakdown:
1. Start with defining input parameters which configure the EA according to user preferences or strategy requirements.
2. Initialize local variables to manage and store runtime data efficiently during the EA operation.
3. The main code is divided into critical sections:
a. The initialization function sets up necessary components and verifies the trading environment.
b. The tick function is called on every new market tick and is crucial for responsive and dynamic trading actions.
- Within the tick function:
i. Signal calculations are performed to decide when and where to place orders.
ii. Volume calculations determine the size of the trading positions based on predefined risk management strategies.
...
Read more...
1. Start with defining input parameters which configure the EA according to user preferences or strategy requirements.
2. Initialize local variables to manage and store runtime data efficiently during the EA operation.
3. The main code is divided into critical sections:
a. The initialization function sets up necessary components and verifies the trading environment.
b. The tick function is called on every new market tick and is crucial for responsive and dynamic trading actions.
- Within the tick function:
i. Signal calculations are performed to decide when and where to place orders.
ii. Volume calculations determine the size of the trading positions based on predefined risk management strategies.
...
Read more...
π8π2β€1
In the latest discussion on OpenCL technology, an issue was identified with MetaTrader 5's inability to employ GPU via OpenCL, specifically encountering an error coded 5114. This error hinders GPU selection for processes demanding elevated computation power. The built-in OpenCL support in MetaTrader 5, while detecting the GPU, fails to initialize consistent GPU usage. This persistent issue since 2013 affects a subset of MetaTrader users across various systems.
The initial workaround involves directly referencing GPU devices by ordinal number in MetaTrader's Journal tab, rather than using the intended flags for device selection. This makeshift solution sidesteps the error but is considered a temporary fix.
The proposed long-term solution involves a series of developmental phases, starting with a basic OpenCalibri test program that confirms feasible GPU usage, progressing through crea...
Read more...
The initial workaround involves directly referencing GPU devices by ordinal number in MetaTrader's Journal tab, rather than using the intended flags for device selection. This makeshift solution sidesteps the error but is considered a temporary fix.
The proposed long-term solution involves a series of developmental phases, starting with a basic OpenCalibri test program that confirms feasible GPU usage, progressing through crea...
Read more...
π4π₯3π2
Forex Trade Manager MT5 facilitates the management of open orders on MetaTrader 5 by automating crucial functions. Upon opening a new order, it automatically configures Stop Loss and Take Profit settings. Additionally, it provides options for a Trailing Stop, which dynamically adjusts Stop Loss based on price movements, and a Break Even feature that adjusts Stop Loss to the open price after a set profit threshold is reached.
The tool allows for tailored control by managing orders either only for the active symbols or universally across all open orders. It also offers a 'Stealth Mode', wherein Stop Loss and Take Profit values are concealed from brokers, providing a layer of strategy invisibility.
Furthermore, the Forex Trade Manager includes settings for precision control:
- Stop Loss and Take Profit are adjustable in pips.
- The Break Even point can be activated after achieving a ce...
Read more...
The tool allows for tailored control by managing orders either only for the active symbols or universally across all open orders. It also offers a 'Stealth Mode', wherein Stop Loss and Take Profit values are concealed from brokers, providing a layer of strategy invisibility.
Furthermore, the Forex Trade Manager includes settings for precision control:
- Stop Loss and Take Profit are adjustable in pips.
- The Break Even point can be activated after achieving a ce...
Read more...
π11β€1π1π1
In recent advancements in Expert Advisor (EA) technology, a comprehensive update has been executed on previously optimized systems, integrating results from two main project streamsβgeometry revisiting and neural network optimization. The use of MetaTrader 5 exclusively has allowed for more structured optimization without third-party dependencies.
A significant development is the amalgamation of optimization results into a single EA to streamline operations previously veiled by the necessity to manage numerous charts and EAs simultaneously. This integration uses both perceptron-based and neural network approaches, which have undergone rigorous forward tests over a one-year timeframe, from December 2021 to December 2022.
For implementation, a set of optimization and testing modes were applied, including "Open prices only" and "Complex Criterion max", with the latter showing more cons...
Read more...
A significant development is the amalgamation of optimization results into a single EA to streamline operations previously veiled by the necessity to manage numerous charts and EAs simultaneously. This integration uses both perceptron-based and neural network approaches, which have undergone rigorous forward tests over a one-year timeframe, from December 2021 to December 2022.
For implementation, a set of optimization and testing modes were applied, including "Open prices only" and "Complex Criterion max", with the latter showing more cons...
Read more...
π6β€2π2π€1
Forex Trade Manager Grid MT5 is an advanced tool designed to assist in managing forex orders conveniently. This tool enables users to initiate a trading cycle by placing a first order with a specified Take Profit. Once the EA (Expert Advisor) is executed, users can set a desired profit in pips through the provided parameters, and the EA will manage the positions to aggregate the set number of pips.
This strategy is particularly effective for manual trades on the current pair, employing a grid management approach. Positions are added between currently open trades at a chosen pip distance, supporting up to 15 trades. The initial three trades are managed with individual take profits; however, from the fourth trade onwards, the EA aims to close the entire grid at a common break-even level.
Crucial parameters for this EA include adding new trades at a defined pip distance from the last ...
Read more...
This strategy is particularly effective for manual trades on the current pair, employing a grid management approach. Positions are added between currently open trades at a chosen pip distance, supporting up to 15 trades. The initial three trades are managed with individual take profits; however, from the fourth trade onwards, the EA aims to close the entire grid at a common break-even level.
Crucial parameters for this EA include adding new trades at a defined pip distance from the last ...
Read more...
π5π5β€4