Soft Actor Critic (SAC) is a reinforcement learning algorithm noted for its use of multiple neural networks: two critic networks and one actor network. These critic networks predict reward estimates (Q-values) based on input actions and environmental states, using the minimum of both outputs to adjust actor network losses. The actor network inputs environment states, outputting a mean vector and a log-standard-deviation vector to form a Gaussian probability distribution for action selection.
SAC's advantage lies in its handling of continuous action spaces, unlike Deep-Q-Networks (DQN), which suits discrete spaces. SAC's architecture allows for more efficient training, reducing overestimation bias while promoting exploration with its stochastic policy.
The inclusion of an entropy term in SAC's objective function fosters exploration, preventing p...
#MQL5 #MT5 #AI #ReinforcementLearning
Read more...
SAC's advantage lies in its handling of continuous action spaces, unlike Deep-Q-Networks (DQN), which suits discrete spaces. SAC's architecture allows for more efficient training, reducing overestimation bias while promoting exploration with its stochastic policy.
The inclusion of an entropy term in SAC's objective function fosters exploration, preventing p...
#MQL5 #MT5 #AI #ReinforcementLearning
Read more...
❤23👍16👏3👌3👨💻3✍2
Explore the integration of Golden and Death Cross strategies with a Trend Constraint Expert Advisor to enhance algorithmic trading. These moving average crossovers, when automated in MQL5, allow traders to effectively capture market reversal points, improving precision and execution consistency. This approach ensures early detection of trend shifts, offering better entry points and synergy between trend-following and reversal strategies. The method involves developing independent Expert Advisors for each strategy, followed by careful melding into a unified system that adopts adaptive timeframes and flexible trading logic. Initial testing highlights areas for further optimization, paving the way for incorporating machine learning advancements in future iterations.
#MQL5 #MT5 #AlgoTrading #Strategy
Read more...
#MQL5 #MT5 #AlgoTrading #Strategy
Read more...
👍36❤22👌3🔥2
The new script showcases an advanced method for calculating the Commodity Channel Index (CCI) by integrating it with a Moving Average to generate dynamic signal lines. This innovative approach allows for more responsive and adaptive signal generation, which is particularly beneficial in volatile market conditions. By modifying the traditional CCI with dynamic parameters, this technique improves the accuracy and timing of trading decisions.
The method utilizes the inherent strengths of both CCI and Moving Averages, providing traders with a comprehensive tool for analysis. It's well-suited for traders aiming for precise entry and exit points while accommodating rapidly changing market data. This approach presents an enhanced way to assess market trends and potential reversals, marking a significant enhancement in technical analysis frameworks.
#MQL4 #MT4 #AlgoTrading #Strategy
Read more...
The method utilizes the inherent strengths of both CCI and Moving Averages, providing traders with a comprehensive tool for analysis. It's well-suited for traders aiming for precise entry and exit points while accommodating rapidly changing market data. This approach presents an enhanced way to assess market trends and potential reversals, marking a significant enhancement in technical analysis frameworks.
#MQL4 #MT4 #AlgoTrading #Strategy
Read more...
👍20❤16✍4👌4👨💻4⚡1
MetaTrader 5 developers are introduced to new functionalities in the HistoryManager.mq5 library, enabling efficient trade history querying. These new functions build on core operations to retrieve key trade data such as duration, tickets, and pip-based metrics. The GetTotalDataInfoSize() function dynamically assesses historical data arrays' sizes, aiding in efficiently accessing diverse datasets. FetchHistoryByCriteria() optimizes data retrieval by gradually widening the time range, starting with recent history. Utility functions like GetLastClosedPositionData() empower users to extract vital information, maintaining a streamlined approach for analyzing previous trades and enhancing algorithmic trading strategies.
#MQL5 #MT5 #Algorithm #AlgoTrading
Read more...
#MQL5 #MT5 #Algorithm #AlgoTrading
Read more...
✍10👍9❤3👌3👨💻2👀1
Mean reversion is a concept where asset prices revert to their historical averages. This strategy opens trading opportunities when prices diverge from these means. To streamline this, an MQL5 Expert Advisor can automate the process using a 50-period Exponential Moving Average (EMA) and the Relative Strength Index (RSI) to generate precise entry signals. The Expert Advisor (EA) will visually represent buy and sell signals directly on the chart, enhancing execution efficiency. This method aids in capturing market fluctuations without manual oversight, leveraging automation to identify and act on mean reversion opportunities effectively in financial markets.
#MQL5 #MT5 #MeanReversion #Strategy
Read more...
#MQL5 #MT5 #MeanReversion #Strategy
Read more...
👍33❤7👌2👨💻2⚡1
In part 3 of this series, we delve into crafting a dynamic Zone Recovery RSI System as an Expert Advisor (EA) using MQL5. This strategy marries the Relative Strength Index (RSI) for pinpointing entry signals with a Zone Recovery mechanism for mitigating losses. The system actively manages trades, placing counter trades when the market moves against the initial position. Code implementation includes setting up dynamic lot sizing, calculating recovery zones, and leveraging classes for structured trade operations. By implementing and optimizing this approach using MetaTrader 5's strategy tester, traders can enhance risk management and bolster profitability.
#MQL5 #MT5 #EA #AlgoTrading
Read more...
#MQL5 #MT5 #EA #AlgoTrading
Read more...
👍27❤8👌3👨💻2✍1
Time series analysis plays a crucial role in fields like finance, allowing for the prediction of future trends using sequences of observations collected over time. Deep learning models have shown effectiveness in capturing nonlinear relationships and handling long-term dependencies in time series data. The MSFformer model introduces a multi-scale feature extraction approach, efficiently integrating long-term and short-term dependencies. Key components include the CSCM module, which constructs multi-level temporal information, and the Skip-PAM mechanism that processes input data at varying time intervals. These improvements enhance time series forecasting accuracy by effectively managing complex temporal relationships at multiple scales.
#MQL5 #MT5 #TimeSeries #DeepLearning
Read more...
#MQL5 #MT5 #TimeSeries #DeepLearning
Read more...
❤29👍27👨💻4👀4🤔2👌2✍1
In the context of technical indicators, the Two Moving Average (MA) system involves analyzing 'Fast' and 'Slow' MA lines in the main window. These lines provide insights into market trends by tracking price momentum over different periods. A visual representation, known as a color histogram (DRAW_COLOR_HISTOGRAM2 style), can be configured to display differences between various price points and MA lines.
Specifically, the histogram can compare Price to Fast MA, Price to Slow MA, or Fast to Slow MA. For greater clarity, the type of price compared can be adjusted using the 'Price' settings. Informational labels can be activated or deactivated, providing real-time values for both 'Fast' and 'Slow' MA indicators. Such indicators can be instrumental for traders seeking trend direction and potential entry or exit points in their trading strategies.
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
Specifically, the histogram can compare Price to Fast MA, Price to Slow MA, or Fast to Slow MA. For greater clarity, the type of price compared can be adjusted using the 'Price' settings. Informational labels can be activated or deactivated, providing real-time values for both 'Fast' and 'Slow' MA indicators. Such indicators can be instrumental for traders seeking trend direction and potential entry or exit points in their trading strategies.
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
👍40❤15👨💻3👌2
Analyzing a trading Expert Advisor's system design reveals challenges in balancing speed and reliability. The goal is to adapt to market volatility without sacrificing system performance. Utilizing MQL5 functions and platform resources can enhance security and efficiency without reinventing the wheel. Code improvements, such as transitioning functions to macros and refining object modeling, contribute to better performance.
The system's approach includes reducing redundant object creation and ensuring the chart is updated, allowing for accurate order and position management. Implementing checks ensures objects are only created when necessary, optimizing EA reliability without unnecessary computational overhead. This streamlined efficiency fosters a robust trading environment adaptable to platform updates.
#MQL5 #MT5 #Trading #AlgoTrading
Read more...
The system's approach includes reducing redundant object creation and ensuring the chart is updated, allowing for accurate order and position management. Implementing checks ensures objects are only created when necessary, optimizing EA reliability without unnecessary computational overhead. This streamlined efficiency fosters a robust trading environment adaptable to platform updates.
#MQL5 #MT5 #Trading #AlgoTrading
Read more...
👍39❤20👌2👨💻2✍1🔥1
An expert advisor is designed around the 'DeMarker' indicator, utilizing pending orders either as 'Limit' or 'Stop'. Signals only trigger upon the formation of a new bar. Users have the flexibility to toggle 'Stop Loss', 'Take Profit', and 'Trailing' functions. A newly integrated parameter allows trailing to activate only when profit surpasses a set level in points, mimicking a breakeven strategy. Pending orders are positioned a specified distance from the current price. If the current spread exceeds the defined maximum, the signal is invalidated, and no order is placed. Should the target profit, defined in monetary terms, be achieved, all open positions are closed, and all pending orders are cancelled.
#MQL5 #MT5 #EA #Indicator
Read more...
#MQL5 #MT5 #EA #Indicator
Read more...
👍30❤15👨💻7👌3
Optimization algorithms have evolved significantly over centuries. Historically, the pursuit of finding maximum or minimum values in function domains, like the Greeks and later Bernoulli's brachistochrone problem, laid foundational principles. Variational calculus introduced by Euler and Lagrange further refined these concepts, leading to advanced methods widely used in solving dynamic and static optimization problems.
In modern times, the introduction of computing technologies has enabled the implementation of complex optimization algorithms, including the development of stochastic optimization algorithms in the 1980s. These metaheuristic algorithms do not require prior function formulas and are influenced by natural models such as particle swarms or ant colonies, handling multiple solutions simultaneously.
To evaluate and compare different opt...
#MQL5 #MT5 #Algorithm #Optimization
Read more...
In modern times, the introduction of computing technologies has enabled the implementation of complex optimization algorithms, including the development of stochastic optimization algorithms in the 1980s. These metaheuristic algorithms do not require prior function formulas and are influenced by natural models such as particle swarms or ant colonies, handling multiple solutions simultaneously.
To evaluate and compare different opt...
#MQL5 #MT5 #Algorithm #Optimization
Read more...
👍56❤20👨💻4👌3🤡3
This technical indicator employs two buffers using OBJ_ARROW for visual cues. It assigns a value based on the relationship between the 'Close' price and the iMA indicator. If the 'Close' price exceeds the iMA, a value of '2' is assigned. Conversely, if it is lower, the value '-2' is used.
Furthermore, it incorporates the stochastic oscillator's 'main' line for additional assessment. If this line falls below 'Value Level #1', the indicator assigns '1'. Should it surpass 'Value Level #2', the value '-1' is designated. This method facilitates a straightforward visualization technique for traders to interpret market conditions when used alongside manually added iMA and iStochastic indicators.
#MQL5 #MT5 #Indicator #Strategy
Read more...
Furthermore, it incorporates the stochastic oscillator's 'main' line for additional assessment. If this line falls below 'Value Level #1', the indicator assigns '1'. Should it surpass 'Value Level #2', the value '-1' is designated. This method facilitates a straightforward visualization technique for traders to interpret market conditions when used alongside manually added iMA and iStochastic indicators.
#MQL5 #MT5 #Indicator #Strategy
Read more...
👍38❤5🤡5👨💻3🏆2🤯1👌1
In the realm of AI, Transfer Learning is emerging as a transformative method for enhancing neural network efficiency and reducing training costs. By reusing the knowledge of pre-trained models, this approach facilitates quicker and more effective problem-solving in new domains. This article delves into the creation of a specialized tool for leveraging Transfer Learning. Key highlights include the design and implementation of a user-friendly interface for managing neural layers, ensuring that only new layers are trained while preserving the donor model's learned knowledge. Through meticulous design and functionality, this tool promises to streamline workflow for traders and developers optimizing algorithmic models in MetaTrader 5.
#MQL5 #MT5 #AI #ML
Read more...
#MQL5 #MT5 #AI #ML
Read more...
❤38👍33⚡4👌3👨💻3✍1😎1
The updated ZigZag indicator now includes automatic step size determination for changing wave direction, eliminating complexity with only one configurable parameter: Scale. The default Scale setting is 1.0, providing a balanced sensitivity. Adjusting the Scale to 0.5 reduces sensitivity, leading to fewer zigzag wave reversals. Conversely, setting the Scale to 2.0 increases sensitivity, resulting in more frequent reversals. The step size for changing wave direction is dynamically determined by the price itself, allowing the user to define the Scale at which to identify zigzag extremes. This flexibility helps in adapting to various market conditions and enhances pattern recognition on price charts.
#MQL4 #MT4 #Indicator #Strategy
Read more...
#MQL4 #MT4 #Indicator #Strategy
Read more...
👍41❤18🤯4🏆2👨💻2🤔1👌1
In recent development of the TabControl WinForms object, a challenge was encountered with graphical element name length that limited the object creation process. The prior naming convention incorporated a full hierarchical reference in each child element's name, often exceeding the 63-character limit. A new naming methodology was implemented to resolve this by using the program name, element type, and an index indicating the number of similar elements already present.
This change allows unlimited nesting without exceeding name length restrictions. To further enhance clarity on the purpose and identification of elements, a new "description" property was introduced. This property provides a meaningful description, making it easier to reference these elements directly in the program.
In parallel, continued development of the TabControl included the crea...
#MQL5 #MT5 #Algorithm #WinForms
Read more...
This change allows unlimited nesting without exceeding name length restrictions. To further enhance clarity on the purpose and identification of elements, a new "description" property was introduced. This property provides a meaningful description, making it easier to reference these elements directly in the program.
In parallel, continued development of the TabControl included the crea...
#MQL5 #MT5 #Algorithm #WinForms
Read more...
👍44❤14👌9👨💻7🏆4🎉2👀2
The new update for the trading strategy Version 2 includes significant enhancements to risk management and signal control. Two new features, 'Stop Loss' and 'Take Profit', have been added for better regulation of trade exits. A 'Trailing Activate' parameter is introduced to improve stop-loss adjustments. Unlike 'Trailing Stop' or 'Trailing Step', 'Trailing Activate' acts as a breakeven function, securing profits as positions turn favorable. Once a position gains 'Trailing Activate' points, the stop loss shifts to this new level, allowing standard trailing functions to proceed.
Additionally, a new 'Time Control' parameter group is introduced to refine signal detection. This feature permits setting a specific time range using the 'Use Time Control' toggle, with start and end times down to the minute. This allows for precise signal searches across daily transi...
#MQL5 #MT5 #EA #Strategy
Read more...
Additionally, a new 'Time Control' parameter group is introduced to refine signal detection. This feature permits setting a specific time range using the 'Use Time Control' toggle, with start and end times down to the minute. This allows for precise signal searches across daily transi...
#MQL5 #MT5 #EA #Strategy
Read more...
👍35✍4👨💻4❤2🎉1👌1
The article focuses on designing a trading system using the Alligator indicator in MetaTrader 5 using MQL5. The Alligator, developed by Bill Williams, utilizes three smoothed moving averages known as the Jaw, Teeth, and Lips. These components help identify market trends, determining whether they are up, down, or sideways.
The piece outlines three strategies: Trend Identifier, Signals System, and Enhanced Signals System. Each strategy generates trading signals based on the position of Alligator lines.
Development of these systems involves implementing MQL5 code to automate signal generation. The code examples show how an EA can be configured to display market signals directly on the chart.
#MQL5 #MT5 #Trading #Indicator
Read more...
The piece outlines three strategies: Trend Identifier, Signals System, and Enhanced Signals System. Each strategy generates trading signals based on the position of Alligator lines.
Development of these systems involves implementing MQL5 code to automate signal generation. The code examples show how an EA can be configured to display market signals directly on the chart.
#MQL5 #MT5 #Trading #Indicator
Read more...
👍52❤28👨💻3👌2⚡1
A new and straightforward indicator has been developed that plots a channel with a constant range, calculated as twice the step-size parameter. This range is violated when the lower quote price surpasses the channel's upper boundary or when the higher quote price falls below the lower boundary. The indicator is built using conditional compilation, ensuring compatibility with both MQL4 and MQL5. For those interested in accessing the source code, it's now available under "Public Projects" in the MetaEditor, labeled with the name "FMIC". Ensure to review and integrate as needed for your technical advancements.
#MQL5 #MT5 #Indicator #FMIC
Read more...
#MQL5 #MT5 #Indicator #FMIC
Read more...
❤28👍14✍9👌6🏆6👨💻1
Refine your MetaTrader 5 algorithmic trading library with improvements to graphical library classes that address mouse interaction issues and optimize color handling. The article discusses enhancements including new sorting properties for graphical elements and a restructured naming convention to prevent excessive name lengths that can lead to resource handling issues. It introduces the development of the TabControl WinForms object, outlining preparations for its full implementation. These adjustments cater to improved layout flexibility and performance, highlighting the significance of efficient UI interaction handling and clean system resource management, essential for both traders and developers refining their trading algorithms.
#MQL5 #MT5 #WinForms #GUI
Read more...
#MQL5 #MT5 #WinForms #GUI
Read more...
❤38👍28👌4✍3😈2⚡1👨💻1
A practical example illustrates the implementation of profit and loss labels for the most recently closed trades in an Expert Advisor. This tool simulates dummy trades allowing observation within the strategy tester environment. The labels appear only on new trades, excluding historical data. This solution utilizes both the Canvas library and the standard library for implementation. Two configurable inputs offer a choice between employing the Canvas method versus text and rectangle objects from the standard library. Users are encouraged to refine or enhance the code as needed to explore alternative approaches or improvements that might better fit your strategic requirements.
#MQL5 #MT5 #EA #coding
Read more...
#MQL5 #MT5 #EA #coding
Read more...
👍37❤14😁4👌3👨💻3💯2🎉1