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
Part 38 covers the development of a Hidden RSI Divergence Trading system with slope angle filters in MQL5. This system tracks hidden divergences to identify trend continuation signals, such as hidden bullish and bearish divergences, by analyzing price swings and RSI behavior. The strategy incorporates slope filtering to confirm signal validity, applies tolerance thresholds for pattern reliability, and executes trades with risk controls. The implementation involves defining input parameters, setting global variables, and leveraging helper functions for swing point verification and divergence assessment. Visual angle calculations on charts support signal clarity. The setup includes automated trade management with customizable lot sizes, stop losses, and take profit strategies.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #RSIDivergence
❀40πŸ‘¨β€πŸ’»7πŸ†3
Short-term trading, including scalping, poses significant challenges for both novice and veteran traders. Many overlook the fundamental importance of higher time frame analysis, resulting in frequent account disruptions. Understanding that price trajectoriesβ€”from point A to Bβ€”primarily originate from higher time frames can change trading outcomes. An expert advisor (EA) built for long-term trends, emphasizing top-down analysis, offers increased accuracy with minimal drawdown.

Engulfing patterns and liquidity purges on higher time frames such as D1, MN, and W1 indicate entry points aligned with overall trend directions. By focusing on these time frames, traders can capture long-term movements effectively. Input parameters in the EA like lot size, stop loss, take profit, and look-back windows ensure adaptable strategies. Engaging with higher time frame analysi...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #EA
❀32πŸ‘¨β€πŸ’»5πŸ‘€5πŸ”₯3πŸ‘1πŸ†1
In the current phase of our statistical arbitrage project, we focus on integrating the stability of portfolio weights and time to mean reversion. The previous analysis relied on liquidity and cointegration strength but omitted these key aspects. We intend to enhance the scoring system by including these metrics.

Stability of portfolio weights is crucial as dynamic changes in financial markets can destabilize weights, risking a breakdown in mean reversion. Regular testing for weight stability prevents strategy pitfalls and adapts to market shifts. Additionally, the half-life of mean reversion quantifies the time expected for spread deviations to halve, influencing position management and risk exposure. A shorter half-life indicates more frequent trading opportunities with lower capital risk. Understanding and incorporating these factors will refine o...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Strategy
❀50πŸ‘8πŸ‘Œ4πŸ‘¨β€πŸ’»4⚑2πŸ‘€2✍1
A method involves dividing price by volume, using a simple moving average as the price metric. Despite its simplicity, there appears to be no significant predictive value in this approach for forecasting. While it provides a streamlined way to analyze price-volume relations, reliance solely on this method does not yield substantial insights for future price movements. It remains an exercise in examining basic market dynamics rather than a robust forecasting tool. The technique serves better as a supplementary analysis rather than a standalone system for predictions.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Indicator
❀32πŸ‘4⚑3πŸ‘Œ3πŸ‘¨β€πŸ’»2πŸ‘1
Explore the technical construction of the Butterfly Oscillator, a novel indicator derived from the Butterfly Curve. This oscillator addresses the challenge of cyclical pattern detection and trading strategy development. Programmed in MQL5, it integrates seamlessly into MetaTrader 5, offering traders dynamic adaptability through bar count and price movement. The oscillator adapts to market conditions, with variable step sizes controlling sensitivity. This dual approach enhances predictive accuracy in identifying market entry and exit points. Supporting both long-term and short-term trading strategies, the Butterfly Oscillator is versatile for traders, recommended for integration into advanced trading systems on MetaTrader 5.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Indicator
❀31πŸ‘¨β€πŸ’»5πŸ‘Œ4😈1
Understanding the implementation of a Multi Indicator Handler in MetaTrader 5 can significantly enhance trading efficiency. This system streamlines the process by automatically listing key indicators directly on the chart, offering a unified view of critical technical measures.

The Multi Indicator Handler employs a structured voting system, categorizing indicators into Trend, Momentum, and Volatility groups. Each indicator generates a Buy, Sell, or Neutral signal based on predefined conditions, with the trend indicators carrying the highest influence for directional analysis.

MQL5 implementation involves coding separate roles for data acquisition, signal interpretation, and graphical display. Key components include an enum for profile modes, the IndicatorSlot data structure, and central functions for creating and managing indicators and chart interfaces....

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀41πŸ‘¨β€πŸ’»5πŸ‘Œ4🀑3πŸ‘€3😈1
Dive into the groundbreaking MacroHFT framework, a cutting-edge algorithmic trading system designed for the volatile cryptocurrency market, leveraging reinforcement learning for high-frequency trading. MacroHFT breaks conventional barriers by utilizing specialized sub-agents trained for distinct market scenarios, which are then orchestrated by a hyper-agent to form a cohesive trading strategy. This dual-agent system integrates macroeconomic data, allowing real-time adaptation to market volatility and trends. With the innovative use of advanced neural networks and context-aware memory modules, MacroHFT provides a resilient and dynamic solution for traders, promising enhanced performance by addressing the intricate challenges of rapid market fluctuations.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Crypto
❀26πŸ‘6πŸ‘¨β€πŸ’»6πŸ‘Œ4🀑3😈1
The previous parts discussed preparations for automating optimization of trading Expert Advisors (EAs). This included creating an optimization conveyor with three stages: optimizing strategies for specific symbols and timeframes, forming groups from optimal strategies, and generating initialization strings for the final EA. To automate conveyor creation, a specialized script was introduced to populate databases with optimization projects and tasks, allowing for staged execution.

Efforts were made to enhance performance through profiling and code optimization, reducing method calls for retrieving trading symbols data. The result was automated generation of results for further analysis, facilitating hypothesis testing for re-optimization impacts on trading performance.

The current focus is on a mechanism for loading EA parameters. This enables partial or com...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #EAs
❀41πŸ‘Œ8⚑1😈1
A new CVD indicator for MetaTrader 5 has been introduced. It offers a lightweight, open-source solution for visualizing net buying vs. selling pressure via CVD candles, facilitating basic volume and order flow analysis. The indicator computes and plots CVD on the chart using M1 data in its free version and features an optional reset on timeframe boundaries.

Functionality extends to all symbols and timeframes. CVD is calculated by determining the direction from the difference between closing and opening values, then calculating the volume delta using tick volume. The cumulative sum of volume deltas produces the CVD, which is plotted as candles.

To get started, copy the file "CVD_MT5_v3_m1_codebase.mq5" to your "MQL5/Indicators" folder and compile using MetaEditor, or simply restart MetaTrader 5. Attach the indicator through the Navigator under Indicators. ...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀43✍5πŸŽ‰3πŸ‘¨β€πŸ’»3😈2
Transient functions, especially the PCF model, have applications well beyond trading. These functions utilize the Gamma distribution to model dynamic and static processes, maintaining a material balance with P+C+F=1. Applied in sectors like oil, mining, and metallurgy, they aid in predicting process dynamics and enhancing extraction techniques without intensive preprocessing, such as gold leaching experiments that improved yields.

In trading, the PCF functions were foundational in developing indicators for MetaTrader platforms, characterized by three lines (Sell, Buy, Trader). They predict price movement by historical analysis, aiding accurate entry and exit signals. Comprehensive experiments with PCF-based indicators also explored resonance effects across multiple currency pairs in automated trading scenarios, showcasing robust predictive capacities a...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Trading
❀60πŸ‘12✍5πŸ†4😈4πŸ‘¨β€πŸ’»3πŸ‘€1
The Exponential Moving Average (EMA) indicator is now available for MetaTrader 5. This tool calculates and displays the EMA directly on charts, providing valuable insights for trend identification and signal generation. The indicator offers options to set a user-defined period and choose the applied price, including Close, Open, High, Low, Median, Typical, or Weighted values.

Utilizing the standard EMA formula, it is initialized with a Simple Moving Average (SMA) for the initial bars, ensuring smooth calculations. The indicator is designed to be lightweight and efficient, allowing traders to easily integrate it into their strategies.

The EMA provides faster reactions to price changes than the Simple Moving Average (SMA), aiding in quick market direction assessments. When the price is above the EMA, it may signal an uptrend; below it, a downtrend. It can b...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EMA
❀43✍8πŸ‘Œ4πŸ‘¨β€πŸ’»3
Explore the latest advancements in algorithmic trading with MetaTrader 5. This article delves into innovative approaches for enhancing library classes to effectively manage and program graphical objects on trading charts. By adding dynamic arrays and refining methods, developers can now create and track complex, customizable composite graphical objects directly from their applications. Additionally, new features allow seamless distinction and management of both manually and programmatically created graphical objects through unique IDs and improved property handling. These advancements facilitate more efficient and precise automation for traders and developers, streamlining the process of both creating and modifying chart elements.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Graphics
❀83✍6πŸ‘¨β€πŸ’»5πŸ‘Œ4πŸ‘€4
The program operates in two modes: Master and Slave. It allows for trade copying from multiple vendors into a single slave account, with adjustable settings for Stop Loss and Take Profit. The copying of pending orders can be enabled or disabled as required. The tool supports seamless operation alongside other Expert Advisors and accommodates accounts with suffixes and prefixes. Trade direction can be modified, and copying can be based on balance proportion, fixed volume, or the supplier's volume.

A conditional setting allows trades to be executed when price deviations occur between supplier and subordinate accounts by a specified value. For functionality, both the supplier and slave account terminals must remain open. The Expert Advisor should be set to Master on the supplier terminal and Slave on the subordinate terminal, with relevant options chosen. ...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #EACopy
❀35πŸ‘¨β€πŸ’»5πŸ‘Œ3πŸ‘2πŸ‘2
This article discusses the creation of an on-chart control panel for MetaTrader 5, targeting traders and developers interested in algorithmic trading. The focus is on building a user-friendly interface using MQL5 to automate lot size calculations and orders, enhancing speed and reliability. Readers learn how to assemble a static GUI layout, addressing key parameters such as order types, entry price, stop-loss, and risk per trade. The article details how to structure an Expert Advisor with essential functions like OnInit and OnTick. By following the guide, developers gain insights into crafting professional interfaces, improving both trading precision and interface usability.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀30✍2πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore Archimedean copulae in MQL5 for algorithmic trading! Unlike Gaussian and Student's t-copulae, Archimedean copulae offer a simplified algebraic structure and asymmetric dependency modeling, ideal for traders and developers seeking more accurate market predictions. Discover how Frank, Joe, Gumbel, Clayton, N13, and N14 copulae can be deployed to capture diverse dependencies in markets. They excel in situations where traditional models falter, particularly in non-linear and asymmetric relationships. Learn to leverage copula-based methods for enhanced pairs trading strategies, overcoming limitations of traditional methods by addressing non-normality and tail dependence, leading to more informed trading decisions.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #algorithm
❀29πŸ‘Œ4πŸ‘3πŸ‘¨β€πŸ’»2
Developers exploring Forex market dynamics can now leverage an innovative tool that visualizes market sessions using MQL5. This project involves creating session-based candlesticks that mirror traditional timeframe analysis, allowing traders to identify session-specific behaviors, such as liquidity peaks and sentiment transitions. The core lies in a CSessionVisualizer class, which independently defines and visualizes global trading sessions with candlestick-like graphics. This tool has been designed for easy integration into larger systems, like the Market Periods Synchronizer EA. By illustrating overlapping sessions, it provides unique insights into market rhythms, enhancing traders' understanding of time and price dynamics in Forex markets.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Forex
❀74πŸ‘5✍4πŸ‘Œ4πŸ‘¨β€πŸ’»4⚑1
An innovative indicator has been developed, designed to compare two modes and timeframes while analyzing EA settings. This tool allows for customization to fit specific requirements or the addition of new features as needed. It systematically saves collected data to a file every 5 minutes, ensuring organized data management with one file created per instance. Adjustments have been made recently to enhance functionality and accuracy. This development represents a practical approach to refining trading strategies and improving automation processes by providing a structured method for analyzing and comparing various operational parameters.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL4 #MT4 #Indicator
❀32πŸ‘¨β€πŸ’»3
An Expert Advisor (EA) for MetaTrader 5 incorporates probability theory to assess growth and decline probabilities of a financial instrument's price. Analyzing a default 10,000-bar price history, the EA identifies how often the price changes by a set number of pips (400 by default) within 50-bar clusters. The analysis reveals the likelihood of price increases or decreases, displaying results on the chart. Trading is triggered when the upward or downward probability surpasses 51%, with the EA executing buy or sell orders respectively. It allows for a fixed lot size or a risk-based calculation tied to the account balance. StopLoss and TakeProfit parameters ensure positions are managed upon opening. However, due to market complexities, such simple models are unlikely to consistently generate profit.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #EA
❀30πŸ‘¨β€πŸ’»7✍3
A Dynamic Multi-Pair Expert Advisor (EA) enhances trading efficiency by seamlessly integrating Scalping and Swing Trading strategies. This sophisticated EA adapts based on real-time market volatility, employing technical indicators like EMA crossovers, RSI filters, and Fibonacci retracements. It intelligently manages risk using ATR-based stop-loss and take-profit levels tailored to forex, crypto, gold, and indices. The system executes precise trades by adjusting position sizes and orders according to each asset's volatility, ensuring consistent results. The EA's automated approach requires minimal manual oversight, allowing simultaneous handling of multiple pairs, catering to both rapid intraday gains and long-term swing profits.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #EA
❀47πŸ‘¨β€πŸ’»4⚑2πŸ‘2πŸ‘Œ2
Exploring the intricacies of the engulfing candlestick pattern, we address its algorithmic application challenges and offer insightful solutions for traders and developers. To extract real value from this classic pattern, we differentiate between opening/closing prices and high/low wicks, reducing market noise. By reimagining the pattern as a three-candle setup, we enhance its fit for MetaTrader 5 backtesting, improving practical application. This refined strategy increases net profit while decreasing trade volume, illustrating a more efficient and promising use of capital. Combining these patterns with ATR indicators aids in risk management, demonstrating an effective way to enrich algorithmic trading strategies.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Candlestick
❀71⚑5✍5πŸ‘Œ4πŸ‘€2πŸ‘1πŸ‘¨β€πŸ’»1