Macd Rsi Trend Engine EA MT5
- エキスパート
- バージョン: 1.0
MACD RSI Trend Engine EA MT5
Dual-Confirmation Trend and Divergence Trading System
Introduction
The MACD RSI Trend Engine EA MT5 combines two of the most widely respected technical indicators in institutional trading — the Moving Average Convergence Divergence (MACD) and the Relative Strength Index (RSI) — into a single, unified algorithmic framework. Rather than acting on either indicator independently, this Expert Advisor requires confirmation from both before committing capital, dramatically reducing the incidence of false signals that plague single-indicator systems. The result is a high-probability trend-following engine that excels in markets exhibiting clear directional movement.
This EA was developed for traders who understand that confluence is the cornerstone of consistent trading performance. The MACD component identifies shifts in momentum and trend direction through its signal line crossovers and histogram dynamics, while the RSI component validates whether those momentum shifts occur within statistically favourable overbought or oversold zones. By demanding that both indicators align before entry, the system naturally filters out low-quality signals during ranging or choppy market conditions where many automated systems fail.
Beyond basic confirmation, the MACD RSI Trend Engine incorporates hidden and regular divergence detection as a secondary entry mechanism. Divergence between price action and the MACD or RSI indicator is one of the most powerful signals in technical analysis, often foreshadowing significant trend reversals before price confirms them. The EA automatically scans for both bullish and bearish divergence patterns across multiple bar counts, providing early entry into emerging reversals while maintaining strict risk controls.
Risk management is comprehensively integrated throughout the system. The EA features adaptive stop loss placement based on recent Average True Range (ATR) values, ensuring that stops are positioned at technically meaningful levels rather than arbitrary distances. Trailing stops, breakeven management, and time-based trade filters further enhance capital protection. The system is fully customisable through its extensive input parameters, allowing traders to optimise for different market conditions and risk tolerances.
Key Features
- MACD + RSI Dual Confirmation — Every trade signal requires favourable alignment from both the MACD (signal line crossover and histogram direction) and RSI (value above/below threshold with slope confirmation). This dual-gate mechanism eliminates the majority of false entries that single-indicator strategies generate.
- Hidden and Regular Divergence Detection — The EA automatically identifies both regular and hidden divergence on the MACD and RSI indicators. Regular divergence signals potential trend reversals, while hidden divergence indicates trend continuation. This feature captures high-probability entries that most automated systems cannot detect.
- Multi-Timeframe Analysis — Configure separate MACD and RSI parameters for the execution timeframe and a higher timeframe validation layer. Trades are permitted only when both timeframes agree on trend direction, adding a structural layer of confluence that aligns short-term entries with intermediate-term trend.
- Adaptive ATR-Based Stop Loss — Instead of fixed stop distances, the EA calculates stop loss based on a multiplier of the current Average True Range. This ensures that stops expand during high volatility to avoid being prematurely stopped out, and contract during low volatility to maintain appropriate risk levels.
- Dynamic Position Sizing — Choose between fixed lot sizes, percentage-based sizing, or ATR-adaptive sizing where the lot size adjusts based on current volatility. The risk-based mode calculates lot size using stop distance and a specified percentage risk per trade, standardising risk exposure across varying market conditions.
- Divergence Sensitivity Control — Fine-tune the divergence detection algorithm through configurable bar lookback periods, divergence strength thresholds, and confirmation requirements. This allows the EA to adapt to different market regimes — wider settings for trending markets, tighter settings for range-bound conditions.
- Comprehensive Signal Filter Suite — Beyond the core indicators, the EA includes a trend filter (based on price relative to a configurable moving average), a volatility filter (minimum ATR threshold to avoid low-volatility whipsaw), and a volume-based filter for platforms supporting tick volume.
- Session and Time Filters — Configure the EA to operate during specific trading sessions (London, New York, Asian) or within user-defined hours. A built-in news filter can optionally skip trades during high-impact economic releases, protecting the account from unpredictable volatility spikes.
- Partial Profit Taking — The EA supports up to three take-profit levels with adjustable allocation percentages. This allows the system to secure profits incrementally while letting a portion of the position run for larger trend moves.
- Real-Time Dashboard — On-chart display provides current MACD and RSI values, divergence status, trend direction indicator, open trade details, and account performance statistics. All critical information is visible without switching windows.
Recommended Parameters
Timeframes
- Execution timeframe: M15 or H1
- Higher timeframe filter: H4 or Daily
- Best pairs: EURUSD, GBPUSD, USDJPY, USDCAD, AUDUSD
MACD Settings
- Fast EMA: 12
- Slow EMA: 26
- Signal SMA: 9
RSI Settings
- RSI period: 14
- Overbought threshold: 70
- Oversold threshold: 30
- RSI slope confirmation bars: 3
Risk Management
- Risk per trade: 0.5% to 2.0%
- ATR multiplier for stop: 1.5 to 3.0
- Maximum spread: 30 points
Trade Management
- Take profit level 1: 60 points (40% allocation)
- Take profit level 2: 120 points (30% allocation)
- Take profit level 3: 200 points (30% allocation)
- Trailing stop activation: 50 points
- Breakeven activation: 40 points
Trading Strategy
Primary Entry — Dual Confirmation Mode. The EA first evaluates the MACD for a signal line crossover aligned with histogram direction. A bullish signal occurs when the MACD line crosses above the signal line and the histogram is rising from below zero. Concurrently, the RSI must be above the oversold threshold (default 30) and rising, indicating that momentum is shifting bullishly but not yet overextended. For bearish signals, the inverse conditions apply. Both conditions must be satisfied within a configurable confirmation window for the trade to execute.
Secondary Entry — Divergence Mode. When the MACD makes a higher low while price makes a lower low (bullish divergence) or the MACD makes a lower high while price makes a higher high (bearish divergence), the EA flags a potential reversal. The divergence signal is strengthened when confirmed by RSI divergence or when the RSI exits oversold/overbought territory. Trades enter after a confirmation candle closes, ensuring that the divergence has been validated by price action.
Trend Validation Layer. If the higher timeframe trend filter is enabled, the EA checks the trend direction on the selected higher timeframe before any entry. Long trades are restricted to uptrends, and short trades to downtrends, preventing counter-trend divergence trades during strong directional moves where they have lower probability of success.
Exit Strategy. The EA employs a multi-level take profit structure that locks in profits incrementally. Stop loss is initially placed using the ATR-based calculation, then transitions to a trailing stop once the price reaches the trailing activation threshold. The breakeven function moves the stop to entry plus a buffer after the price reaches the breakeven activation level, ensuring that no winning trade results in a loss.
Recommendations
- Broker: ECN/STP with competitive spreads and minimal requotes
- Minimum Deposit: $300 for micro accounts, $1,500 for standard risk profiles
- Leverage: 1:30 minimum, 1:100 recommended for optimal margin utilisation
- Environment: VPS hosting with low-latency connectivity to your broker server
- Market Conditions: Performs best in trending markets; reduce position size during expected low-volatility periods
- Backtesting: Minimum 12 months of quality tick data required; use 99.9% modelling quality
Risk Disclaimer
Trading foreign exchange on margin carries substantial risk and is not suitable for all investors. The MACD RSI Trend Engine EA MT5 is an automated trading system that executes predefined strategies based on technical indicator logic. Past performance of backtested or forward-tested results does not guarantee future profitability. There is no guarantee that the divergence detection or dual-confirmation mechanisms will prevent losses. Users should conduct their own due diligence and risk assessment before trading with real funds. The software developer accepts no responsibility for trading losses incurred through the use of this product. Always trade responsibly, use stop losses, and never risk more than you can afford to lose.
