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 utility presents a histogram tool for analyzing the durations of custom bars in a subwindow, expressed in minutes. It is specifically designed for custom chart types such as renko boxes, PnF, and equivolume bars, where bar durations vary unlike standard charts organized by fixed timeframes. The limitation of MT5 platform in not supporting variable timeframe charts necessitates using M1 timeframe as the base, offering the highest accuracy in bar alignment due to its granularity. On standard charts, this indicator holds limited value, as it would display identical bar heights. The tool comes with a Directional option, which, when set to true, displays the histogram with positive or negative values based on the bar's price movement, otherwise displays absolute values by default.

👉 Read | Forum | Share!

#MQL5 #MT5 #Indicator
👍3212👨‍💻4👌1
The Quarters Board, an advanced tool for traders, simplifies chart analysis by automatically managing quarter level toggles. It introduces a panel on the live chart with buttons for Large Quarters, Small Quarters, Overshoot/Undershoot, and Trend Direction. Activating or deactivating levels is streamlined as a single button press changes their visibility. Moreover, the Trend Direction feature offers real-time market insights using a 50-period simple moving average comparison against current prices, enhancing decision-making.

The EA’s design prioritizes user interaction with an organized interface, cleanly displaying relevant price levels and commentary without clutter. This tool enhances the trading experience with both intuitive controls and analytical depth.

👉 Read | VPS | Share!

#MQL5 #MT5 #EA
👍1911👨‍💻3👌2
The previous analysis highlighted several key issues affecting the performance of the replay/simulation service for MetaTrader 5 using MQL5. The primary concerns centered around the handling and optimization of graphical objects, particularly the OBJ_BITMAP_LABEL and the control indicator module's interaction.

To address these challenges, the initial strategy involved implementing minor yet necessary code changes aimed at improving readability and achieving basic performance enhancements. These included refining the naming conventions and restructuring object access mechanics. The objective was to facilitate easier debugging and maintenance while providing slight enhancements in efficiency.

Further groundwork was laid in understanding the integration between different components of the simulation service. The service was adjusted to read data directly from ...

👉 Read | Quotes | Share!

#MQL5 #MT5 #Replay
👍3520🔥8👨‍💻7👌53
The SuperTrend indicator utilizes Average True Range (ATR) volatility to identify market trends, providing insights into potential buying or selling opportunities. It operates on a simple premise: the Upper Band is calculated as the Source Price plus the product of a Multiplier and ATR, while the Lower Band is the Source Price minus this product. A green SuperTrend indicates an uptrend, whereas red suggests a downtrend. This indicator is suitable for trend-following strategies and identifying potential reversals.

To install, copy the indicator file into the MetaTrader 5 indicators folder, then refresh MetaTrader 5. Key parameters include ATRPeriod (default 22), Multiplier (default 3.0), and SourcePrice. Additional functionality includes the option to consider price wicks in calculations. Multi-Timeframe versions are available online.

👉 Read | CodeBase | Share!

#MQL5 #MT5 #Indicator
👍47245👀5👨‍💻3👌2🏆1
Improving EA systems requires understanding order behavior in MetaTrader 5. For netting accounts, a refined approach is essential to prevent complications like unwanted OCO orders. Implementing robust modifications in the C_Router class can handle order parsing and ensure EA reliability by preventing errors during pending orders. Strategic checks determine if pending orders fall within existing position limits, adapting based on account type. By integrating these systematic improvements, algorithmic trading becomes more secure, mitigating risks like unprotected open positions. Comprehensive handling ensures efficient and error-free trading experiences, leveraging precise MetaTrader 5 functionalities for safe execution of ongoing strategies.

👉 Read | AlgoBook | Share!

#MQL5 #MT5 #EA
👍6028👨‍💻8👌6🎉5🔥2
Exporting transaction history can enhance trading analysis and strategy simulations. When exporting, the history file is stored in either the MQL5/Files directory or the shared Common/Files directory, depending on the settings. File naming can be handled automatically or specified manually in the script parameters.

The exported history file is compatible with the Simple History Receiver Expert Advisor, facilitating the replication of trading transactions on an alternative trading server. Parameters such as file naming, data separators, and decimal point notation are customizable, allowing for flexible format options. Users can opt to save files in the Common folder for shared access across multiple terminals, ensuring efficient data management and utility.

👉 Read | NeuroBook | Share!

#MQL5 #MT5 #Script
28👍193👨‍💻3
The article introduces the Chaikin Oscillator, a momentum indicator created by Marc Chaikin, used to measure the momentum of the accumulation distribution line. The calculation involves a combination of money flow multiplier, money flow volume, and the accumulation distribution line. Typically used in platforms like MetaTrader 5, its practical application provides insights into directional changes in market trends.

Different strategies are outlined using the Chaikin Oscillator, including crossover signals at zero level, movement analysis based on recent values, and trend analysis through uptrend and downtrend scenarios.

The post also addresses MQL5 programming for implementing these strategies into automated trading systems on MetaTrader 5, offering step-by-step guidance on parameter settings for custom trading applications. The article emphasizes te...

👉 Read | Freelance | Share!

#MQL5 #MT5 #Indicator
👍5826🏆1043👨‍💻2👌1
This Non-Directional Bias EA functions independently from traditional trading indicators and patterns. It employs various trading strategies and offers risk management options along with customizable settings. Continuous and random trade executions are based on chosen strategies. Despite its reliance on randomness, effective risk management contributes to profitability.

Key features include multiple trading strategies such as Hedge_Style, and BuySell_Random, alongside specific buying/selling strategies like Auto_Swap and Buy_Sell. Users can enable or disable trade execution with the New_Trade setting. The EA supports different stop-loss and take-profit types like Virtual_SL/TP and Classic_SL/TP, allowing for discretion in trade management. Trailing stops are customizable, offering both virtual and classic options to suit broker capabilities.

Risk managemen...

👉 Read | CodeBase | Share!

#MQL4 #MT4 #EA
31👍23👨‍💻4👌3👀3👏2
Understanding and mastering the IF statement and its companion ELSE is foundational for MetaTrader 5 developers. The IF statement evaluates a condition, executing code blocks based on true or false outcomes, while ELSE provides alternative execution paths when conditions are false. Grasping these concepts enables the creation of dynamic and responsive trading algorithms. Seasoned programmers understand the pitfalls of excessive nesting, which can obscure logic. Simplifying with logical operators can enhance readability and maintainability of code. The article emphasizes these principles and encourages experimentation to build a robust understanding, crucial for developing effective algorithmic trading solutions.

👉 Read | Calendar | Share!

#MQL5 #MT5 #Programming
👍198👨‍💻6
NumPy in MQL5 extends algorithmic trading by integrating enhanced mathematical capabilities akin to Python's NumPy. While MQL5 offers ample tools such as Fuzzy, Stat, and Alglib, its alignment with Python's syntax aims at easing code translation for complex computations. This adheres to the growing demand for robust mathematical functions in algorithmic trading and ML models.

With optimized codebases needed for sophisticated trading robots, understanding NumPy's role in MQL5 becomes essential. The language's array functions, inspired by Python, provide the flexibility necessary for high-level mathematical operations. Key features include vector/matrix initialization, statistical functions, and random number generators, aligned with Python's methodologies.

Incorporating NumPy functions in MQL5, from Fast Fourier Transforms to linear algebra and polynomials, enh...

👉 Read | AppStore | Share!

#MQL5 #MT5 #NumPy
👍2410👨‍💻6👌1
Explore the innovative UniTraj model, a pioneering framework that revolutionizes multi-agent trajectory modeling by unifying trajectory prediction, missing data recovery, and spatiotemporal analysis. This model utilizes the Ghost Spatial Masking module integrated within a Transformer-based architecture to manage trajectory data, offering a robust approach to handling spatial features and dependencies. Additionally, it incorporates bidirectional temporal encoding via the Mamba model for comprehensive long-term trajectory generation. Discover how this approach improves algorithmic trading and enhances performance for traders and developers. MQL5 implementation details highlight effective handling of incomplete data and efficient use of resources, providing insightful advancements in algorithmic trading technology.

👉 Read | AppStore | Share!

#MQL5 #MT5 #MultiAgent
👍4028👨‍💻98
An Expert Advisor (EA) with a truly random approach is available for those interested in a non-traditional trading method. It operates by randomly picking currency pairs, lot sizes, and order types, without reliance on technical indicators, price actions, news events, or candlestick patterns. Despite its randomness, it has demonstrated profitable outcomes. The EA provides various trading strategies and risk management plans with customizable settings.

Key features include options for trading strategy: OneSide and DoubleSide. It allows setting minimum and maximum lot sizes to maintain control over trade size randomness. StopLoss and TakeProfit values can be configured in points/pips, offering flexibility over trade exits. The trailing mechanism can be activated by setting Trailing_Start and Trailing_Gap values.

Risk management is adaptable, letting users cho...

👉 Read | AppStore | Share!

#MQL4 #MT4 #EA
👍2210👨‍💻6🤡5🤯2
Introspective Sort, commonly known as Introsort, is an optimized hybrid sorting algorithm that integrates Quick Sort, Heap Sort, and Insertion Sort to deliver high performance by adapting to various scenarios. Introsort initiates with Quick Sort for its average O(n log n) time complexity. However, if the recursion surpasses a predefined depth, it seamlessly transitions to Heap Sort, maintaining efficiency under the worst-case O(n log n) scenario.

Moreover, when sorting smaller partitions, Introsort employs Insertion Sort for its simplicity and speed, especially effective with partially sorted data. This adaptive process allows Introsort to operate with optimal performance across different data sets, making it a preferred choice in programming environments like C++ STL, Microsoft's .NET, and others.

The flexibility is enhanced by allowing a custom compari...

👉 Read | AppStore | Share!

#MQL5 #MT5 #Algorithm
👍2310🔥3😁3👨‍💻3
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
👍4530👨‍💻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
👍2318👾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
👍1917👨‍💻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
👍38324👨‍💻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🔥43👨‍💻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
👍5425👀8👨‍💻6🔥3👏3🤯2