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
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
Navigating the complexities of trading futures contracts in MetaTrader 5 can be streamlined with a well-designed cross order system. This system leverages historical data without the need for separate charts, providing a seamless trading experience. Key to this implementation is understanding the structure and execution of futures contracts, like those on the Brazilian Exchange (B3), which include specific expiration rules and naming conventions. By integrating a C_HLineTrade class, we manage orders visually on a chart, while C_Router and C_OrderView classes handle order routing and messaging. Testing on demo accounts is crucial to ensure system reliability before live trading.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Futures
πŸ‘51❀23πŸ’―4πŸ‘¨β€πŸ’»3πŸ”₯2πŸ‘Œ1
Analyzing your trading algorithm, several areas need attention for potential improvement:

1. Code Structure: Break down your code into smaller functions for modular design. Separate logic for indicator calculations, trade evaluation, order execution, and trade management. This improves readability and maintains ease for future updates.

2. Trade Entry Logic: Ensure your entry conditions consider trend direction and market context to avoid frequent false entries in choppy markets. It may be beneficial to incorporate additional filters like moving averages.

3. Risk Management: Review and adjust risk parameters, such as position sizing and SL/TP levels. Ensure these align with your risk appetite and market conditions.

4. Spread and Slippage Management: Include a dynamic spread and slippage assessment. Consider historical spread values for different sess...

πŸ‘‰ Read | CodeBase | Share!

#MQL4 #MT4 #Algorithm
πŸ‘35❀20πŸ‘¨β€πŸ’»3πŸ†1
Enhance trading analysis with a unique auditory element using a script that plays piano notes corresponding to candlestick properties. It assigns higher notes to rising bullish candles, while lower notes resonate with bearish declines. Ensure sound files are located in the Files/Sounds directory for seamless execution. Simply copy the provided code and create a new script in your environment. For those who download additional files, remember to uncomment the specified lines for proper compilation. This approach offers an additional layer of engagement with your datasets by leveraging auditory cues as part of technical analysis strategies.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #script
❀23πŸ‘13✍4πŸ‘Œ2🀨2πŸ‘¨β€πŸ’»2
To enhance the functionality of our WinForms library objects, the implementation begins with creating a new base class that will serve as a blueprint for all subsequent WinForms objects. This foundational class will streamline properties inherited across multiple components, eliminating redundancy in property application.

This base class will be derived from the broader form object class that already handles mouse interactions effectively. Implementing the AutoSize and AutoSizeMode for panel objects involves ensuring the size of the container dynamically adjusts to accommodate objects without overlap. This is critical, especially when objects are docked and aligned in sequence, requiring accurate resizing of the panel.

We optimized object handling by pre-arranging elements within the panel structure before rendering, ensuring smooth transitions and ...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #WinForms
πŸ‘40❀25πŸ‘Œ5πŸ‘¨β€πŸ’»4πŸŽ‰3⚑1πŸ”₯1
The Custom MA Cross with RSI Indicator for MT5 combines moving averages with RSI to identify trend changes. Adjustable settings include MA types (SMA, EMA) and RSI levels for precise signal filtering. Enjoy alerts for MA crossovers and on-chart buy/sell signals when RSI conditions are met. This indicator eliminates weak signals, enhancing trend-following strategies and increasing confidence in market entries.

Designed with user-friendly options, it accommodates both novice and experienced traders. With compatibility across all timeframes and currency pairs on the MT5 platform, it is a versatile tool for improving trading precision. Customization with preferred colors adds to the personalization experience, making trading more efficient.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘28❀18πŸ€”2πŸ‘¨β€πŸ’»2⚑1
The strategy is applicable to both Gold and Bitcoin across various timeframes, including M1, M5, M15, M30, H1, and H4. These timeframes provide different perspectives for analysis, ranging from minute-to-minute observations to broader hourly trends. Employing various timeframes allows for a comprehensive understanding of market movements and can aid in aligning short-term tactical approaches with long-term strategic goals. It is essential to tailor analysis to the specific behavior of each asset, considering their unique volatility and trading patterns. Be mindful of the inherent risks and ensure that strategies are robust enough to adapt to market changes.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #AlgoTrading
πŸ‘31❀26πŸ‘¨β€πŸ’»2⚑1πŸ‘1πŸ‘Œ1
Metaheuristic algorithms are gaining importance as data volumes surge and tasks grow more complex. These algorithms offer high convergence rates and rapid processing, crucial for timely project execution across various domains. They provide an effective mechanism to handle large datasets, yielding superior solutions to traditional numerical methods. Key benefits include resource efficiency, vital in cloud computing environments with limited computational resources.

The Artificial Showering Algorithm (ASHA) exemplifies these algorithms through a unique probabilistic water flow model. Its adaptive characteristics, such as infiltration for avoiding local minima and dynamic probability control, enable it to explore and exploit the solution space effectively, improving optimization outcomes significantly.

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #AlgoTrading
πŸ‘35❀17✍6😁2πŸ†2πŸ‘¨β€πŸ’»1
Operator precedence rules in programming are crucial for determining how expressions are evaluated. Understanding these rules prevents unexpected outcomes in code execution. Precedence is generally ranked from top to bottom in documentation tables, with operators at the top holding higher priority.

Operators are categorized for clarity, and references take precedence over all others. Type and binary operators follow, requiring right-to-left reading, unlike referencing. Arithmetic operators, seen as familiar, are processed left to right, adhering to their position in the hierarchy.

Parentheses can define or alter precedence, marking them essential for clarifying code. Misunderstanding precedence can lead to compiler warnings due to unpredictable behavior, underscoring the necessity for clear structure.

The ternary operator streamlines logic and improve...

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Education
πŸ‘44❀27πŸ‘Œ2πŸ‘€2πŸ‘¨β€πŸ’»1