MQL5 Algo Trading
387K 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
This article delves into the fundamentals of using the FOR statement in MQL5, an essential tool for control flow in programming. The FOR loop is favored by programmers for its clarity and readability, encapsulating loop control within its declarationβ€”qualities that make it preferable over WHILE and DO WHILE loops for certain applications. Though the article revisits basic concepts, it underscores the significance of understanding foundational principles to tackle more advanced challenges in algorithmic trading. Through practical illustrations, it demonstrates different ways to implement the FOR loop, underscoring the importance of grasping each component's purpose for effective algorithm development.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Education
πŸ‘51❀13πŸ‘€5⚑3🀣3🀩1πŸ‘¨β€πŸ’»1
When considering a buy strategy, the Awesome Oscillator (AO) changing direction above the zero line is a key indicator. Conjunction with an engulfing candle or a close above the previous candle's high can provide additional confirmation. Incorporating RSI filters as part of this strategy helps minimize false alerts, especially towards the trend's end. RSI filters play a critical role in maintaining signal accuracy by filtering out noise during market volatility. This approach leverages multiple technical indicators to enhance decision-making processes in trading scenarios. Utilizing these tools effectively requires a meticulous analysis of historical data to ensure robustness in diverse market conditions.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
❀29πŸ‘24✍3πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸŽ‰1🀩1
The Williams Percent Range (WPR) is a momentum indicator developed by Larry Williams, serving as the reverse of the Stochastic Oscillator. It gauges the closing price against the high-low range, oscillating between 0 and -100. Crucial levels are -80, -20, and -50, indicating overbought or oversold conditions. It offers enhanced insights when combined with additional tools like price action techniques and moving averages.

This indicator assists in building three distinct trading strategies: Williams %R - OB/OS for spotting overbought/oversold levels, Williams %R - crossover for buy/sell signals around the -50 mark, and Williams %R - MA incorporating moving averages for refined signals. Implementing these strategies in MetaTrader 5 automates signal generation, tailored to risk preferences.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #Indicator
πŸ‘39❀36πŸ‘¨β€πŸ’»7🀩3✍1⚑1
A new EA has been developed incorporating multiple indicators such as RSI, Stochastic Oscillator, and Bollinger Bands to manage trend opportunities and counter-trend reversals. It can operate on several currency pairs, applying a range of features like trailing, risk, and money management systems. The system settings allow for customizable signal strength and trade direction options, adapting to both trend-following and reversal strategies.

This EA comes with meticulous time frame checks for more accurate signal validation. Configurable lot size and comprehensive stop loss/take profit systems further optimize trading strategies. Risk management includes stop or continue trading actions based on predefined loss limits. Money management defines equity targets for trade closures, providing flexibility in trading continuity.

Additional restriction modes include ...

πŸ‘‰ Read | Quotes | Share!

#MQL4 #MT4 #Scalper
πŸ‘32❀23πŸ”₯6⚑2🀯2πŸ€”1πŸ‘¨β€πŸ’»1
An innovative update to the Times & Trade chart organization system is being implemented. This enhancement focuses on translating complex trade data into a more accessible text format, providing a clearer interpretation of market dynamics. By adding specific variables and modifying existing classes, the system now models essential data, helping users detect subtle market changes earlier. The primary goal is to present a comprehensive picture of market movements, which supports efficient tape reading. This development highlights the importance of data optimization in real-time trading scenarios, allowing better decision-making through improved system efficiency.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
❀52πŸ‘30πŸ‘¨β€πŸ’»8⚑6✍3🀯3πŸ‘€1
A function is designed to draw arrows and provide alerts when the RSI indicates overbought or oversold conditions. Specifically, the function triggers when the RSI is below 30, suggesting potential buying opportunities. It also considers scenarios where the price opens above the 8-period moving average, and the lower wick of the candle exceeds the body size. This setup is optimal for identifying possible reversals, offering insights into shifts in the micro trend. It's a valuable tool for traders aiming to detect potential trend changes during extreme market conditions, enhancing decision-making processes in trading strategies.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #RSI
πŸ‘37❀17πŸ‘¨β€πŸ’»4
Explore how combining the Average Directional Index (ADX) and Commodity Channel Index (CCI) can lead to a more robust algorithmic trading system. ADX confirms trend strength, while CCI captures momentum, providing a comprehensive view of market dynamics. Implemented in Python, the approach benefits from its superior performance over MQL5, leveraging features like MetaTrader's Python Module to integrate broker data. This amalgamation allows for precise trend initiation or reversal detection, enhancing trade decisions. Developers can create multidimensional signal arrays, analyzing feature patterns to ensure efficient, data-driven strategies. A detailed foray into these indicators can revolutionize trading techniques.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Strategy
πŸ‘27❀17⚑5πŸ‘¨β€πŸ’»2😱1
The Market Structure Flip Detector Expert Advisor addresses the issue of false reversal signals in trading. By integrating ATR as a bar-count filter, it discerns valid highs and lows, reducing noise-driven trades by approximately 40%. The EA alters its depth to align with market volatility, ensuring precision in identifying significant pivots and maintaining trend bias. It initiates a bearish flip when a new high is less than the previous one, and a bullish flip when a new low exceeds the previous trough. This tool is particularly effective in shorter timeframes with a sell setup success rate of at least 70%. Validate signals with additional methods and assess performance across different currency pairs.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #EA
πŸ‘58❀31πŸ‘¨β€πŸ’»7πŸ‘Œ6✍5
This indicator plots a moving average on tick volume rather than price. Histogram bars represent volume, with colors corresponding to the price bars. It's an MQL4 conversion of a classic concept. The original code can be found online. When tick volume exceeds the moving average, it may indicate increased market activity, which could signal strong trends or volatility. Conversely, if tick volume remains below the moving average, it might suggest lower liquidity, indicating a quieter or consolidating market phase. Understanding these dynamics can provide insights into market participation levels and potential trend shifts.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #Indicator
πŸ‘26❀25✍2πŸ‘¨β€πŸ’»1
The article explores using candlestick patterns for algorithmic trading, focusing on MetaTrader 5 and machine learning. It begins with a detailed explanation of candlestick fundamentals, discussing popular patterns like Doji, Hammer, and Marubozu. The article then describes developing a detection indicator for these patterns and visualizing them using MetaTrader 5. A key innovation is training an AI model using historical candlestick data, addressing challenges like pattern rarity and data imbalance. By applying machine learning, the author demonstrates potential improvements in decision-making for traders, suggesting integrating this model into trading robots for effective predictions.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #AI
❀25πŸ‘18πŸ‘Œ2πŸ†1πŸ‘¨β€πŸ’»1
The concept of handling complex financial patterns in programming involves efficiently searching and identifying specific market patterns, such as the Outside Bar pattern. This pattern contrasts with the Inside Bar as it splits into BUOVB (Bullish) and BEOVB (Bearish) directions. Streamlining access methods by consolidating them into a singular approach significantly enhances code simplicity. It's critical to integrate the latest MQL5 updates and rectify any discovered errors in the existing library.

Library improvements include adding properties for candle size ratios, handling ENUM_SYMBOL_SWAP_MODE, fixing memory leaks, and correcting enumeration returns for order ticket values. Error handling has been enhanced by checking for the presence of symbols on the server before indicator creation. Graphical elements and pattern classes have been r...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #PriceAction
πŸ‘56❀25⚑2πŸ€”2πŸ‘¨β€πŸ’»1πŸ‘€1
Recursive Moving Average (RMA) techniques maintain efficiency while ensuring desired smoothing levels. Examples, such as DEMA and TEMA indicators, demonstrate recursive exponential moving averages without loop limits, maintaining fast execution. The introduction of a trigger line assists in generating trading signals, relying on parameters like the regular period, number of iterations, and smoothing method, either exponential or smoothing only.

The system provides the optional feature of arrow drawing at signal occurrences. The trigger line’s function is equivalent to the average sum of smoothing iterations. Trade indications arise when lines cross. Caution is advised when setting parameters to avoid excessive signals on charts. This RMA version processes open bar prices exclusively.

πŸ‘‰ Read | Docs | Share!

#MQL4 #MT4 #Indicator
πŸ‘31❀14πŸ‘¨β€πŸ’»3⚑2
Customizing trading charts with high-quality visuals enhances market analysis but requires meticulous MQL5 programming. Implementing a dynamic graphical interface involves using resource-driven image scaling with bicubic interpolation.

The process involves several key steps: embedding and scaling images on MetaTrader 5 charts, allowing for user-controlled graphical interfaces. Images are loaded as bitmap resources, scaled to fit chart dimensions with bicubic interpolation, and positioned based on user inputs. This approach maintains aspect ratios, toggles displays, and ensures optimized real-time performance.

Bicubic interpolation, selected over nearest neighbor and bilinear methods, offers superior clarity, leveraging a 4x4 pixel neighborhood to ensure smoother gradients and sharper edges. This choice is ideal for dynamic resizing, enhancing decision-makin...

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #Trading
πŸ‘26❀17πŸ‘Œ3πŸ‘¨β€πŸ’»2⚑1
Automating trading strategies in MQL5 involves several steps to ensure precision and performance. The focus for Part 16 is on developing an Expert Advisor for the Midnight Range Breakout with Break of Structure strategy in MQL5. This strategy detects market conditions from the midnight to 6 AM price range and uses Break of Structure confirmation to execute trades.

The strategy is suitable for markets during session transitions, like the London opening. Implementation involves defining global variables, setting up chart visualizations, and utilizing functions like `OnTick` to manage price updates. Functions like `isNewBar` help synchronize the strategy with market timing, ensuring accurate range calculations.

Visualization functions draw rectangles and lines to represent price ranges. Helper functions then detect and visualize breakouts, followed by trade e...

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #Strategy
πŸ‘72❀34πŸ†9πŸ‘¨β€πŸ’»3πŸ‘€3πŸ‘Œ2
John F. Ehlers' technical innovation is presented with the MyRSI indicator using "Noise Elimination Technology" specifically designed for MT4. This tool enables traders to analyze market trends with improved clarity by filtering out market noise. It provides a smoother RSI experience, allowing for more accurate signal detection. The focus here is on enhancing decision-making capabilities through refined data interpretation. Such advancements in analytical tools are crucial for traders who rely on precision and efficiency in their operations. An understanding of these tools is vital for optimizing trading strategies and achieving more reliable outcomes in a dynamic market environment.

πŸ‘‰ Read | Freelance | Share!

#MQL4 #MT4 #AlgoTrading
πŸ‘24❀23πŸ‘¨β€πŸ’»3
A new indicator provides a countdown display of the remaining time on any active candle across multiple timeframes. This tool can assist in precise trading by allowing users to track the closing times of candles with accuracy. It functions as an overlay on the trading chart, compatible with various chart setups, enhancing the ability to align trading actions with market movements effectively. Designed for flexibility, it adapts to diverse trading strategies by delivering real-time updates. This feature caters to both short-term and long-term traders seeking to make informed decisions through time management within their technical analysis framework.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #Indicator
πŸ‘39❀22πŸ‘€6✍4🀣3⚑2πŸ‘¨β€πŸ’»1
Discover how MetaTrader 5 enhances tape reading through its innovative Time & Trade system, offering traders a more accessible approach to analyzing market movements. By integrating full contract monitoring directly into trading charts, this approach simplifies interpretation while maintaining efficiency. The article explains the implementation of a custom subwindow and a unified C_TimesAndTrade class to seamlessly track and visualize trades, offering clear and practical insights for traders. This method captures all trading ticks but focuses only on significant data, using compact mini-candles to represent trades over time. Developers benefit from a robust, configurable representation for informed decision-making in algorithmic trading.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #TapeReading
πŸ‘62❀27πŸŽ‰5⚑3πŸ‘€3😎2πŸ‘¨β€πŸ’»1
In trading, Fair Value Gaps represent imbalance areas where asset prices may revisit. Identifying these gaps can assist in predicting potential market corrections. Traders often analyze fair value gaps to anticipate price movements back to these levels, driven by market forces seeking equilibrium. Recognizing these gaps requires a keen understanding of market dynamics and price action. Fair value gaps, reflecting discrepancies between buyers and sellers, can be critical for setting entry or exit points. The concept emphasizes the importance of monitoring price patterns that deviate from equilibrium, offering insights into potential retracement opportunities. Adaptation to this analytical method can enhance strategic trading decisions.

πŸ‘‰ Read | Forum | Share!

#MQL4 #MT4 #EA
❀32πŸ‘24πŸ€”6πŸŽ‰3πŸ‘¨β€πŸ’»3✍2😁1
Technical indicators tracking price action can be optimized using machine learning. The previous exploration of supervised learning with Multi-Layer Perceptron (MLP) models laid foundational insights into predictive outputs. Focusing on moving from discrete to continuous input vectors aligns with advancements in AI, enabling better data processing with modern tools like GPTs.

Our reinforcement learning model expands upon supervised learning by integrating actions and rewards. These components aid in effective decision-making according to predicted market movements. This phase uses policy networks to translate forecasted states into actionable strategies, such as sell orders. Rewards quantify trade profitability, including excursions that occur beyond simple profit or loss.

Trust Region Policy Optimization (TRPO) enhances learning efficiency and stability t...

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #ML
πŸ‘24❀18πŸ‘¨β€πŸ’»3πŸ‘1πŸ‘Œ1
In the latest section of our replay/simulation project, important enhancements were made to address the challenge of displaying the remaining time until the next bar begins. This task is particularly complex within a simulation environment due to variable synchronization issues with the system clock.

The updates introduced involve modifications to the mouse indicator and the supporting framework. A critical change lies in the integration of a global variable within the mouse indicator code, enabling efficient data transmission relevant to the current bar's time. The C_Study.mqh file now includes mechanisms for handling custom events, ensuring updates occur with precise timing calculations crucial to performance during simulations.

This structured approach improves functionality and aligns simulation behavior more closely with real-time trading envir...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Simulation
πŸ‘32πŸ‘Œ23❀17✍7😁2πŸ‘¨β€πŸ’»1
The Leading Indicator, developed by John Ehlers, is designed for early signal detection in trading. Users can adjust the alpha values to suit specific trading requirements. This indicator offers clear buy signals when the line turns green and sell signals when it turns red, enhancing decision-making. Although the MetaTrader 4 version isn't included in this discussion, interested users can find and download it, along with the source code, through a provided Telegram channel. Access to the channel is available via a link in the profile. Subscriptions to the channel for updates and resources are recommended.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Indicator
❀36πŸ‘20⚑7✍6πŸ‘¨β€πŸ’»3🀩2πŸ‘Ύ1