MQL5 Algo Trading
388K subscribers
2.56K photos
2.56K 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
The article explores advanced strategies for integrating web data into MetaTrader 5 Expert Advisors. It presents three innovative solutions for web data capturing, highlighting the use of a client-server model to optimize data processing without waiting for remote servers. The discussion evolves towards leveraging MetaTrader 5's lesser-known terminal global variables, enhancing data transmission across timeframes. Despite the double type limitation in global variables, the article provides insights into manipulating data structures to achieve efficient information transfer. Developers can apply network communication protocols to broaden data handling capabilities, offering potential pathways to more sophisticated trading systems.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #Trading
πŸ‘45❀30πŸ‘¨β€πŸ’»5πŸ‘Œ1πŸ†1
The EA under discussion presents a streamlined version of the RRS Randomness in Nature EA. Designed to operate without relying on traditional technical analysis such as indicators or price patterns, it randomly selects trades, currency pairs, lot sizes, and order types. Despite its randomness, the EA allows for multiple trading strategies and customizable options including risk management. Key elements include setting minimum and maximum lot sizes to control randomness, configurable stop loss and take profit values, and a choice of risk management through fixed money or balance percentage methods. The EA also determines the maximum spread and slippage to execute trades effectively. Users should note that if encountering any operation errors, removing '#property strict' from line 8 of the code may resolve the issue.

πŸ‘‰ Read | CodeBase | Share!

#MQL4 #MT4 #EA
πŸ‘23❀18πŸ‘Ύ4πŸ†2πŸ‘¨β€πŸ’»2
The article discusses the implementation and testing of a bacterial chemotaxis optimization (BCO) algorithm. Inspired by the movement of bacteria, the BCO method models how bacteria navigate chemical gradients to find optimal solutions in complex optimization landscapes. The algorithm simplifies the trajectory by using probabilistic turns and a streamlined approach to movement, adapting positions based on historical data. The author's enhancements include simplifying rotational calculations and reducing parameter complexity, focusing on improving algorithm efficiency. The results of initial tests showed limitations, prompting a refined implementation to better adapt to optimization challenges by balancing local and global search strategies.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #algorithm
πŸ‘19❀17πŸ‘¨β€πŸ’»4πŸŽ‰1
The article addresses issues with simulation response times in a MetaTrader 5 environment, focusing on optimizing tick processing and system performance. A technical challenge arose due to excessive ticks per minute, particularly with futures contracts, impacting both simulation and real data processing. To resolve this, a maximum tick limit is introduced in the simulation framework, balancing tick volume and processing efficiency. The article delves into coding adjustments, including modifications to the tick simulation class and file reading functions, to streamline data handling. These changes enhance consistency and timing, crucial for reliable algorithmic trading and simulation practices.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Simulation
πŸ‘38❀32⚑4πŸ‘¨β€πŸ’»3πŸ‘2😱1πŸŽ‰1
A static zigzag connects points at the intersection of moving average crossovers. This offers a new perspective on moving average analysis. A buy signal occurs when the fast period moving average crosses above the slow one. Conversely, a sell signal is when it crosses below. The zigzag forms a green leg at bullish crossovers and switches to red at bearish ones.

Being static, read the zigzag as follows: forming a downwards red leg signals a buy, anticipating the next green leg. Conversely, an upwards green leg signals a sell, with the next leg turning red. A backstep filter helps validate zigzag legs by reducing noise. Suitable moving average periods may vary per user preference. This experimental indicator features a unique zigzag format with enum cycles.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Indicator
❀30πŸ‘22πŸ”₯4✍3πŸ‘¨β€πŸ’»3πŸ‘€3πŸ†2
Dive into algorithmic trading with MetaTrader 5! We've crafted a fully automated Mitigation Order Blocks Strategy in MQL5, applying Smart Money principles. This strategy identifies key zones where institutional liquidity events happen, using historical price action to filter bullish and bearish order blocks. We've programmed conditions for mitigation validation, ensuring price revisits blocks and signals rejection. Our EA confirms these events with higher-timeframe trends while expertly managing trade execution, using dynamic entry, stop-loss, and take-profit settings. Robust risk management ensures optimal position sizing and drawdown protection. Harness the power of MQL5 for precise trade automation and effective market analysis.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Strategy
❀29πŸ‘22πŸ‘¨β€πŸ’»5πŸ†1
Looping constructs serve as essential tools in programming, offering control over repetitive tasks. Using just IF-ELSE makes code hard to digest, hence languages offer loop statements like FOR and WHILE, increasing readability. Despite their advantages, loops carry risks such as infinite loops due to errors in termination conditions, potentially leading to system hang-ups.

Understanding loops, particularly WHILE and DO-WHILE, helps mitigate these risks. WHILE loops execute when a condition is true, while DO-WHILE guarantees execution at least once, providing flexibility. These constructs are pivotal in structuring code efficiently, allowing for repeated execution without redundancy, making them invaluable in programming practices.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #coding
πŸ‘54❀25πŸ‘€8πŸ‘¨β€πŸ’»6πŸ”₯3πŸ‘3🀯2
An integrated indicator has been developed that consolidates multiple non-standard moving average options. This enhancement allows for the application of various moving average calculations within a single framework. By combining these methodologies, it facilitates a more comprehensive analysis, potentially offering a broader perspective on data trends. Implementing such a tool can be particularly useful for those interested in experimenting with different moving average approaches without switching between multiple indicators. This strategic integration fosters efficiency and streamlined data interpretation, making it a valuable asset for developers and analysts focused on technical analysis.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Indicator
πŸ‘23❀12⚑4πŸ†4πŸ‘¨β€πŸ’»2
Autonomous driving shares challenges with trading, notably in navigating dynamic environments. An autonomous vehicle's task of predicting future road events is complex due to unknown goals of other road users. Multi-agent traffic scenarios involve intricate interactions further complicated by rule-based constraints. Recent research adopts a vectorized approach for compact scene representation. However, real-time motion prediction remains difficult due to computational demands. The paper "HiVT: Hierarchical Vector Transformer for Multi-Agent Motion Prediction" introduces a method that uses a hierarchical model to manage interactions and dependencies, addressing computational efficiency and accuracy in motion prediction for large numbers of agents. It applies a Transformer architecture for improved scene comprehension.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #AITrading
πŸ‘25❀10πŸ‘¨β€πŸ’»3πŸ”₯1πŸ†1
Algorithmic traders frequently encounter challenges when relying on RSI (Relative Strength Index) due to its sensitivity to parameters like period, timeframe, and market-specific factors. Traditional guidelines (e.g., levels of 70 and 30) may not yield consistent signals across different contexts. To address these inconsistencies, a more dynamic approach involves examining the true range of the indicator and adjusting the midpoint based on observed data, rather than preset ranges.

Implementing this in MQL5 offers advantages, incorporating a flexible RSI class to handle multiple periods and levels. This facilitates analysis across varied market conditions, enabling traders to empirically assess profitability of different RSI deviations and optimize periods through systematic testing rather than static assumptions.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #AITrading
πŸ‘32❀30✍4πŸ‘¨β€πŸ’»4πŸ†1
Analyzing market momentum can provide critical insights for traders. The Green line on the chart indicates the total FVGs present during an uptrend within the specified window size, whether they are filled or unfilled. Conversely, the Red line shows the total FVGs in a downtrend with the same considerations. If the Green line is positioned above the Red line, there is an indication of upside momentum, suggesting a potential upward market movement. Conversely, when the Red line exceeds the Green line, it signals downside momentum. This indicator can also be utilized to determine exit points in trading strategies, aiding in effective decision-making. Monitoring these trends can enhance the accuracy of market predictions.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Indicator
πŸ‘25❀17πŸ‘¨β€πŸ’»2
Gradient descent is an optimization algorithm for finding a local minimum of a differentiable function. Used extensively in machine learning, it fine-tunes model parameters by moving in the opposite direction of the gradient for minimizing a cost function. The learning rate determines step size; too large, and minima will be skipped, too small, and the process becomes slow.

For linear regression, gradient descent optimizes coefficients by reducing error between predicted and actual values. It's crucial to normalize input variables to ensure consistent learning rates across datasets.

For logistic regression, gradient descent handles classification issues; here, the cost function, Binary Cross Entropy, drives adjustments.

Understanding gradient descent is necessary for effective implementation in various machine learning models.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #Gradient
πŸ‘46❀35πŸŽ‰4πŸ‘¨β€πŸ’»4πŸ‘€3🀯2πŸ”₯1
RRS Tangled EA emerges as a refined version of its predecessors, RRS Chaotic EA and RRS Randomness in Nature EA. It embraces a unique strategy by randomly selecting currency symbols, lot sizes, and order types, independent of technical indicators and fundamental analysis. This randomness approach demands precise settings like Take Profit, Stop Loss, Trailing, and robust Risk Management to optimize profit potential. It operates as a multi-currency or multi-asset EA, capable of trading various currency pairs even when attached to a single chart.

Key settings require attention: Ensure minimum and maximum lot sizes are defined for controlled randomness. Establish Stop Loss and Take Profit in points or pips, with the option to disable. Trailing mechanisms can be tailored with specific start points and gaps. Risk management can be set with FixedMoney or Balance...

πŸ‘‰ Read | Quotes | Share!

#MQL4 #MT4 #EA
πŸ‘26❀17πŸ‘¨β€πŸ’»5
The article explores the implementation of a grid trading strategy using an Expert Advisor (EA) in MQL5 for futures contracts on MOEX via MetaTrader 5. The strategy automates order placements at specific intervals around a price range, capitalizing on market volatility through small price fluctuations. Key elements include the configuration of buy/sell limits, managing stop-loss and take-profit scenarios, and dynamically updating orders based on market movement. The approach emphasizes a balance between frequent trades for small gains and fewer trades for larger profits, making it suitable for both range and trend markets while ensuring risk management with clear stop-loss settings.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #GridTrading
πŸ‘49❀44πŸ‘¨β€πŸ’»5πŸŽ‰4πŸ‘€2✍1πŸ”₯1
A trading strategy utilizing two custom "MA Other TimeFrame Correct" indicators can be a straightforward way to approach market analysis. In this setup, the Expert Advisor opens positions with a constant lot size, avoiding complexities such as Stop Loss, Take Profit, or Trailing mechanisms. Instead, trades close when an opposite signal emerges.

The process involves intersection checks, specifically comparing indicator values between bar #1 and bar #0 to generate trading signals. This method exclusively uses a 'Constant lot' approach for position size management.

Additional functionality includes an extended operation log via the 'Print log,' providing detailed insights into all trading activities. This supports systematic evaluation and refinement of trading tactics.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Strategy
πŸ‘40❀23πŸ‘¨β€πŸ’»2πŸŽ‰1πŸ‘€1
Explore the creation of custom indicators in MetaTrader 5 using chart objects, a step beyond traditional buffers and plots. This approach offers advanced flexibility, enabling the development of complex visual representations critical for identifying unique trading patterns and price levels. The technique allows dynamic illustration of Harmonic Patterns, fundamental in recognizing potential market reversals. By focusing on practical application, learn to pinpoint swing points, integrate Fibonacci levels for pattern validation, and label key chart areas. This methodology enhances precision in trade signal accuracy, providing valuable insights for both professional traders and developers seeking to create sophisticated MQL5 indicators.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Harmonic
πŸ‘57❀21πŸ‘¨β€πŸ’»8πŸ‘Œ1
A new indicator has been developed for MT5, providing alerts for scenarios where Bollinger Bands and Envelopes converge on extreme values simultaneously. The system sends buy alerts for bullish candles opening and closing below both the lower Bollinger Band and the lower Envelope. Conversely, sell alerts occur with bearish candles that open and close above the upper Bollinger Band and the upper Envelope. Users have customizable input variables, including period and deviation settings for both Bollinger Bands and Envelopes. Alerts are available in various forms, such as push notifications, audible signals, and emails. The indicator features arrows for buy and sell signals on the chart and excludes drawing the Bollinger Bands and Envelopes directly onto the chart.

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Indicator
πŸ‘46❀19✍4πŸ‘¨β€πŸ’»3⚑1
Explore how algorithmic trading leverages data clustering for practical use cases. Discover methods where clustering results are utilized independently or integrated as input to enhance trading strategies. Learn the theoretical foundations and practical implementations of clustering, with insights into using tools like OpenCL and KMeans. Delve into innovative approaches such as calculating statistics using labeled data and normalizing cluster distances for input into other models. Understand the value of probabilistic models in predicting market behavior, showcased by a practical downturn model giving insights into trading decisions, without the reliance on complex neural networks. An essential read for advancing your trading algorithm expertise.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Trading
πŸ‘46❀37πŸ‘€9πŸ‘¨β€πŸ’»8🀨5✍1πŸ†1
The EA employs a custom indicator, RSI_MAonRSI_Dual, which triggers signals based on two lines intersecting. Signal interpretation is straightforward: below the 50.0 line suggests a BUY, above indicates a SELL. The system adapts to the selected 'Working timeframe' for detecting new bars and handles trading parameters like trailing on a bar or tick basis.

Market entries are controlled such that only one deal is executed per bar. In terms of direction, trades can be restricted to BUY only, SELL only, or both. Time control offers flexibility, allowing trade signal searches within specified hourly ranges, even crossing from one day to the next.

Critical trading settings include stop-loss and take-profit levels defined in points, with the option to disable them by setting values to zero. The EA supports dynamic lot size calculation based on constant value or pe...

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #EA
πŸ‘79❀43πŸ‘10πŸ‘¨β€πŸ’»9πŸ‘€6πŸŽ‰4✍3
The challenge of implementing multiple dynamic logistic regression functions has been addressed in a recent article. The primary issue is avoiding hardcoding when managing multiple data columns, adhering to clean code principles and DRY. The article critiques the traditional approach of creating multiple functions with static numbers of independent variables. In contrast, Python's flexibility with *args and kwargs allows dynamic handling, a feature less straightforward in MQL5. Nonetheless, a workaround can be achieved using strings and efficiently managing data within arrays.

One proposed solution is to consolidate data into a single array, allowing for dynamic manipulation within loops. This approach circumvents the limitations of dynamically creating arrays in MQL5, although challenges remain in resource management and processing speed. Storing...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Regression
❀31πŸ‘24πŸ‘¨β€πŸ’»3πŸ‘Œ2
In recent tests, 10 signal patterns using MA and Stochastic Oscillator were examined. Seven patterns were practicable over a one-year period, with two successfully using both long and short trades. The thesis behind the tests involves combining machine learning modes: supervised-learning (SL), reinforcement-learning (RL), and inference-learning (IL). In previous analysis, SL and RL integration showed how the RL model refines trading decisions beyond price changes, acting as a layer on SL decisions.

Deep Deterministic Policy Gradient (DDPG) is explored, applied for continuous action spaces. DDPG uses two neural networksβ€”actor and critic networksβ€”to estimate actions and evaluate their rewards, reducing noise impact and stabilizing training. The replay buffer aids in learning stability, using random sampling to prevent temporal correlations. The critic network esti...

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #RL
πŸ‘34❀16πŸ‘¨β€πŸ’»4πŸ†3