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 Generalized AutoRegressive Conditional Heteroskedasticity (GARCH) volatility/volume indicator leverages the GARCH(1,1) recursion model to predict financial asset price volatility. Essential for financial time series analysis, it assumes autocorrelated variance and employs an autoregressive moving average for error term modeling. Given financial markets' irregular error term variations, GARCH is pivotal. Financial firms rely on this model to estimate volatility in stocks, bonds, and indices, including its tested efficacy in Forex, commodities, and cryptocurrencies.

The indicator's input parameters include: Gamma for the constant term, Alpha for the ARCH coefficient reflecting the reaction to recent shocks, Beta as the Generalized ARCH coefficient for persistent variance, Bar window for analyzing rolling means, and Threshold scale adjustment. It featur...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Indicator
❀33πŸ‘Œ4πŸ‘¨β€πŸ’»4
The article delves into advancements in multivariate time series forecasting with a focus on the LSEAttention framework. This approach addresses numerical instability in traditional Transformers used in long-term forecasting tasks, which are prone to issues like attention and entropy collapse. The integration of Log-Sum-Exp (LSE) and GELU activation functions within this framework enhances numerical stability and mitigates abrupt transitions in attention scores, ensuring a balanced distribution of attention across input sequences. Furthermore, the implementation aspects of LSEAttention in MQL5, including modifications to Softmax layers and Relative Attention modules, underscore the practical enhancements made to bolster forecasting accuracy and efficiency.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #TimeSeries
❀27πŸ‘2πŸ‘¨β€πŸ’»2
Explore the integration of MQL5 and Python to create an advanced candlestick recognition system for traders and developers. By leveraging MQL5's data collection capabilities and Python's pattern detection power, the system identifies key candlestick patterns like Hammer, Shooting Star, and Engulfing in near real-time. The MQL5 EA collects and sends bar data to a Python-powered microservice, which evaluates patterns and returns insights back to the EA for chart annotation. This robust, low-latency approach enhances trading strategies with precise, timely analysis, while ensuring clear, structured logging for transparent and effective troubleshooting.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Candlestick
❀36πŸ‘¨β€πŸ’»3
Discover the transformative power of Market Profile in MetaTrader 5. Unlike typical indicators, Market Profile provides traders with insights into market dynamics by integrating time, price, and volume, revealing which price levels attract the highest trading activity. With the supplied MarketProfile.mq5 code, visualize how prices stabilize and identify key support and resistance levels during three major trading sessionsβ€”Asian, European, and American. This tool helps traders decipher price equilibrium and trends, offering strategic entry and exit points without the guesswork. Grasp the underlying principles and enhance trading strategies with a deeper market understanding through this insightful analysis approach.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #MarketProfile
❀40😈3πŸ‘¨β€πŸ’»3πŸ‘€2
The article continues the deep examination of the C_ChartFloatingRAD class in the context of replay system development, focusing on its main code without metaphors or superfluous language. The central part of this evaluation is the understanding of how Chart Trade code functions to create graphical elements without explicit object creation code, emphasizing programming techniques that allow it to work seamlessly.

The text covers the removal of unnecessary lines, focusing on concise code that adheres to modern practices like using 16-bit types over 32-bit to optimize performance and memory usage. The sequence starts with the CreateWindowRAD procedure, key for efficiently inserting graphical elements on the chart.

The interaction between procedures and the efficient use of macros and encapsulation are highlighted as core practices. AdjustTemplate and Ad...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀63πŸ‘9πŸ‘¨β€πŸ’»5πŸ’”2
To implement rectangle creation on a chart, utilize objects within the charting library. Begin by defining the coordinates for the rectangle's position. Specify parameters for the rectangle’s dimensions such as height and width. Ensure the code correctly references the chart's axes to maintain alignment. This setup facilitates the visual representation of data zones or highlights specific chart areas. Adjust properties to modify appearance, such as border color and opacity. Examine the execution environment to ensure compatibility with the charting platform's API. Verify the display across different resolutions to maintain consistency in the presentation.

πŸ‘‰ Read | Signals | @mql5dev

#MQL4 #MT4 #script
❀37⚑6πŸ‘5πŸ‘¨β€πŸ’»2😱1
Unlock the power of recursion in MetaTrader 5 programming! delve into the intricacies of recursive loops, a powerful alternative to traditional iterative programming. This concise guide demystifies recursion's potential for solving complex problems with ease, perfect for traders and developers keen on algorithmic efficiency. Understand how recursive strategies complement event-driven applications, enhancing your proficiency in crafting efficient solutions. Gain insights into the nuances of using recursion in algorithms like Fibonacci, and discover where iteration might be a more performant choice. This foundational knowledge equips you with the versatility to tackle diverse challenges in financial market programming.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Recursion
❀30πŸ‘4πŸ‘Œ2πŸ‘¨β€πŸ’»2
Discover innovative approaches in algorithmic trading with the cyclical price movement model. This method uses harmonic oscillators and non-linear models to predict market trends effectively. By integrating finite differences and innovative oscillator equations, you can enhance your trading strategy's flexibility and profitability. Dive into advanced models like Elliott Waves and the Duffing Oscillator, each offering unique solutions for adapting to varying market conditions. These strategies provide traders with a robust framework for optimizing trades and achieving stable long-term results. Learn to harness mathematical models for strategic gains in robust algorithmic trading environments.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Trading
❀65πŸ‘14πŸ‘¨β€πŸ’»7πŸ”₯4πŸ‘€4😁1πŸ†1
The implementation of the martingale strategy in expert advisors (EAs) based on signals from any indicator can significantly impact trading performance. This approach involves increasing position sizes following losses to potentially recover past deficits when a winning trade occurs. Careful consideration should be given to risk management, as martingale can lead to substantial drawdowns. It is crucial to ensure that the underlying strategy and signals provide reliable entries. Traders should thoroughly test and optimize the EA, possibly on historical data, to evaluate its effectiveness and adaptability across various market conditions. Caution is advised due to the inherent risks associated with this strategy.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL4 #MT4 #EA
❀32πŸ‘13πŸ‘Œ4✍2πŸ‘¨β€πŸ’»2🀯1
Discover how to enhance MetaTrader 5 development by seamlessly integrating custom indicators into Expert Advisors. This guide delves into creating subwindows and utilizing the iCustom command to maintain clear chart views without clutter. By exploring object-oriented programming principles like class inheritance, developers can extend existing functionalities securely and effectively. Learn to incorporate general-purpose indicators within EAs, enabling robust and modular trading solutions. This approach not only maximizes code efficiency but ensures tested components remain stable, allowing traders and developers to leverage sophisticated algorithmic trading strategies with minimal custom adjustments.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #EA
❀55πŸ‘18🀯4πŸ‘€4πŸ‘¨β€πŸ’»3⚑2
The Pending_tread Expert Advisor (EA) is engineered for automating grid-based scalping and breakout strategies with ease. It initializes a grid of pending buy and sell orders around the current market price, optimizing both for rapid market dynamics and stable execution on any time frame or currency pair, with a noted effectiveness on XAUUSD.

Key Features:
1. Configurable Grid: Establish customizable pending orders above and below the market with flexible order count settings, optimized by the PipStep for precise spacing.
2. Customized Orders: Choose between buy stop/sell limit above and sell stop/buy limit below the market price, ensuring strategic positioning.
3. Profit Management: Implement automated take profit levels in pips for each order, eliminating the need for manual supervision.
4. Risk Control: Modify lot size and slippage parameters to match risk...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀42πŸ‘11⚑3✍1πŸ‘¨β€πŸ’»1
A script has been developed to manage chart objects efficiently in MT5. This tool scans the current chart and identifies all chart objects present. It systematically counts each object and deletes them as required. During this process, the names of the objects are logged to maintain a record of what was present before deletion. Such functionality is essential for managing chart clutter and ensuring a clean workspace. Implementing this script allows for automation in maintaining chart hygiene, enhancing user focus and resource management without manual intervention or oversight. This process boosts efficiency in handling multiple chart objects effectively.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #script
❀24πŸ‘10πŸ‘€3πŸ‘¨β€πŸ’»2πŸ‘1πŸŽ‰1
A new chart overlay feature is now available for technical analysis, allowing historical candle data to be displayed alongside current chart activities. The tool accurately adjusts replay zones to mirror live chart dynamics, providing dynamic tooltips with comprehensive candlestick data including open, high, low, close, range, and volume metrics. Users can customize colors for clearer bullish and bearish differentiation.

This utility is designed for intraday trading on timeframes such as M1 to H1. It involves an easy three-step process to visualize how current market behavior compares to selected historical data. Simply attach the indicator, choose a past date, and observe the market’s behavior for potential pattern recognition.

Important notes to consider include potential performance impacts when using large ranges on low-end devices, absence of can...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀40πŸ‘10✍2πŸ‘¨β€πŸ’»1
In our continued enhancement of the Multi-Timeframe Scanner Dashboard using MQL5, we added dynamic positioning and toggle functionality, allowing users to drag the dashboard across the chart and switch between minimized and maximized states. This improves usability and keeps the chart organized, essential features for effective analysis in trading environments.

Implementing these changes involved defining additional UI elements and global variables to track states and mouse events, along with update functions to manage the dashboard's responsive behavior. Testing confirmed that the dashboard's reactivity is enhanced, allowing for substantial interactivity improvements. Future work will address event handler conflicts to refine the priority for chart vs. dashboard updates, optimizing user interaction further.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #MQL5
❀29✍9πŸ‘7πŸ”₯3πŸ†1πŸ‘¨β€πŸ’»1
Enhance your MetaTrader 5 experience by integrating HTTP requests directly with MQL5. This capability empowers traders to communicate with external websites, facilitating actions like data retrieval, sending notifications, and more. The new module mimics Python's requests, allowing seamless GET, POST, PUT, and DELETE actions with minimal effort. Simplify uploads with file type detection and binary encoding, while session and cookie handling emulate HTTP sessions effortlessly. Enhance security through basic authentication and manage URL parameters with ease. Explore the nuances of this setup and streamline trading operations while accessing practical applications in algorithmic trading.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #WebRequests
❀28πŸ‘9πŸ‘¨β€πŸ’»5⚑1✍1πŸ‘€1
The Awesome Oscillator and Envelopes Channel form an exceptional pair for algorithmic trading, meshing trend-following with support/resistance analytics. The strategy explores 10 nuanced signal patterns, particularly effective for USD/JPY on a 30-minute chart. The Awesome Oscillator (AO), created by Bill Williams, distinguishes short-term from long-term price trends and identifies divergences. Its histogram reveals trend clarity and potential reversals. Paired with the Envelopes Channel, which identifies overbought/oversold areas and adapts to volatility, the coupling balances range-bound and trend strategies. Implemented in MQL5, these combinations enhance trading accuracy by confirming signals through AO, improving risk-reward by targeting momentum shifts effectively.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀34πŸ‘31πŸ‘¨β€πŸ’»6πŸ‘Œ3πŸ”₯2πŸ†1
An expert advisor is developed using a Bollinger band crossover strategy. It focuses on identifying price movements relative to Bollinger bands to assist in trading decisions. An essential feature of this EA is its capability to ensure lot sizes remain within the restrictions imposed by brokers, promoting compliance with trading conditions. Strategies like this are crucial for maintaining disciplined trading within established parameters, helping to manage risk effectively. By aligning lot sizes with broker limitations, it aids in preventing issues related to oversized trades. This is important for sustaining long-term trading success while using Bollinger bands for technical analysis.

πŸ‘‰ Read | Docs | @mql5dev

#MQL4 #MT4 #EA
❀26πŸ‘5πŸ‘¨β€πŸ’»3πŸ€”1
Reducing lag in moving average crossover trading strategies can be achieved without advanced modeling tools. One approach uses different periods on price types rather than price prediction. A promising strategy is the dual time-frame moving average crossover. It involves observing higher timeframe crossovers and aligning trades on the lower timeframe. The strategy employs trend-following and mean-reverting entry modes, with exits determined by higher or lower timeframe signals.

Challenges remain in achieving stable strategies, as initial backtest results often do not translate to forward tests. Improved stability might require allowing optimizers to adjust risk parameters dynamically. While this strategy shows potential, repeated optimizations with varying parameters could yield more stable results.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Algorithm
❀24πŸ‘6✍5πŸ‘Œ3πŸ‘¨β€πŸ’»3
Integration of automated trade execution in the News Headline Expert Advisor (EA) seeks to fill a critical functionality gap by employing the CTrade class. This advances the EA from merely providing alerts and insights to executing trade orders autonomously during news events. Previous iterations already delivered features such as direct chart display of economic events, real-time news headlines, technical indicator insights, and AI-driven market analysis.

The introduced strategy implements time-based pending orders, allowing for reaction to market volatility driven by economic news. Key changes include leveraging the economic calendar to time trade entry, using pip-accurate price calculations, and deploying CTrade for streamlined order management, which covers packaging, tracking, and error handling.

Enhanced risk management is crucial, incorporating...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Strategy
❀28πŸ‘¨β€πŸ’»8πŸ‘4🀯2πŸ‘Œ1
The introduction of automation using TA-Lib significantly enhances candlestick pattern detection in Python. TA-Lib, with its ability to automatically identify over 60 candlestick patterns, integrates seamlessly into Python, making it a preferred tool for many developers. The library, originally crafted in ANSI C, supports more than 200 technical indicators, facilitating complex trading strategies.

Combining TA-Lib with mplfinance and matplotlib allows for the automatic plotting of financial charts. This system leverages a Flask web service to facilitate real-time data processing and visualization. Its integration with MQL5 ensures chart I/O remains streamlined, focusing on efficient data processing and pattern recognition.

Understanding the roles of essential libraries such as Flask, NumPy, Pandas, and Matplotlib is crucial for developers aiming to c...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #TA-Lib
❀73πŸ‘10πŸ‘¨β€πŸ’»8πŸ‘Œ4✍2