Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Multi_Divergence_EA - MetaTrader 5 Expert - MT4/MT5 Resources

author EAcpu | 6 reads | 0 comments |

This Expert Advisor is designed to automate complex trading strategies based on: Market divergence . The core idea is to identify a high-probability reversal point by looking for a point. signal convergence From the three most widely used oscillators: Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD) and Stochastic Oscillator.

The EA's logic is built on a multi-layered confirmation process to ensure high-quality trading signals and filter out market noise.

Discrepancy detection: The EA continuously scans the price movement and three indicators to find differences.

Bullish divergence (potential buy signal): This occurs when the price makes a new low, but the indicator fails to do so and instead makes a higher low. This suggests that the bearish momentum is waning and a bullish reversal may be imminent.

Bearish divergence (potential sell signal): This occurs when the price makes new higher highs, but the indicator makes lower highs. This indicates that the bullish momentum is fading, signaling a potential bearish reversal.

The power of fusion: The unique advantage of an EA is that it does not rely on a single indicator. Instead, it waits for a user-defined number of indicators ( minimum number of confirmations ) to show divergence simultaneously. For example, a trade will only be triggered when at least 2 out of 3 indicators confirm the same divergence, significantly increasing the reliability of the signal.

Advanced signal filtering (optional): To further improve accuracy, two additional filters can be enabled:

Trending filter: Use the 50-period EMA to determine overall market trends. If enabled, the EA will only enter buy trades when the price is above the EMA, and sell trades when the price is below the EMA. This helps avoid trades that go against the dominant market momentum.

Volume filter: A trading signal is considered valid only if the volume of the signal bar is significantly higher than the average volume of the previous bars. This confirms that there is strong market interest and belief behind the potential reversal.

All external variables are fully customizable so you can tailor your strategy to your liking.

===Risk Management===

Lot Size : Set fixed trading volume, if Use money management yes Wrong .

Stop Loss : Stop loss in points.

Take Profit : Take Profit in points.

Maximum Spread : The maximum spread allowed for opening a new position.

Use Money Management : If True , the EA automatically calculates the lot size based on the following conditions Risk percentage .

Risk percentage : The percentage of account equity and risk for each transaction.

=== Difference Settings ===

RSI_Period , MACD_fast , MACD_SLOW , MACD_signal , Stoke_K , Stoch_D , Stoch_Slowing : These are the standard input parameters for RSI, MACD and Stochastic indicators.

=== Discrepancy detection===

Bar Check : The EA will scan the nearest bar number for the divergence pattern.

Minimum Column Distance : The minimum number of bars to verify on each side of the peak/trough. This helps ignore smaller price fluctuations.

Minimum Divergence Strength : A filter that targets the minimum strength (0-1) required for a divergence signal.

Minimum number of confirmations : a key parameter. Set the minimum number of indicators (from 1 to 3) that must show divergences to open a trade.

Use volume filter : set to real Enable volume confirmation filter.

Use Trending Filter : Set to real Enable EMA based trend filter.

===Trade Settings===

Allow purchases / Allow selling : Enable or disable long or short trading.

Maximum transaction volume : The maximum number of concurrent transactions allowed.

Magic number : The unique identifier of the EA transaction to prevent interference with other robots.

symbol: The strategy is versatile and can be applied to any major currency pair (e.g. EURUSD, GBP/USD) and other liquidity instruments.

time frame: Divergence signals are generally more reliable on longer time frames. It is recommended to use this EA H1, H4 or D1 Charts can filter out market noise and capture more important market movements.


Attachment download

📎 multi_divergence.mq5 (18.45 KB)

Source: MQL5 #62742

Verification code Refresh