Trading Robots for MetaTrader 5

Special Offer!

Time Left to Buy:

Up to 25% OFF

Shopping cart

The cart is empty

MetaTrader 5

Top Rated Products MT5

250 $188 $ KTS poverty killer robot
Thato Modiba
3.85714 5 7 Product
5 500 $4 125 $ Bonnitta EA MT5
Ugochukwu Mobi
4 5 3 Product
Request a price Boom500 Scalper
Vhutshilo Evidence Masithembi
2.33333 5 3 Product

MP Divergence Never Lie

mp-divergence-ea-logo-200x200-4224
495 $371 $

Free updates are included

We accept crypto: BTC, ETH, BCH and more...

30-Day Money Back Guarantee
100% Guarantee of Originality

Information

Experts
MetaTrader 5
Alexandru Chirila
1.4
10

Overview

MACD Divergence Expert Advisor (EA)

Overview

The MACD Divergence Expert Advisor (EA) automates the MACD Divergence Trading Strategy, identifying and trading both the validation and invalidation of divergence patterns. The EA utilizes the Moving Average Convergence Divergence (MACD) indicator to detect price-momentum discrepancies, providing early signals for potential trend reversals.

With customizable thresholds, trendline visualization, flexible entry mechanisms, and risk management features, this EA executes trades based on bullish and bearish MACD divergences while allowing for precise risk allocation and automated position sizing based on a fixed risk amount.

MACD Divergence Trading Strategy

1. Understanding Divergence

Divergence occurs when price action and the MACD histogram or signal line move in opposite directions, signaling a possible trend reversal:

  • Bullish Divergence:

    • Price forms a lower low, but the MACD forms a higher low.

    • This suggests weakening downward momentum and a potential bullish reversal.

  • Bearish Divergence:

    • Price forms a higher high, but the MACD forms a lower high.

    • This suggests weakening upward momentum and a potential bearish reversal.

2. Trading the Divergence and Its Invalidation

The EA trades both the validation and invalidation of divergence patterns:

  • Validation:

    • A bearish divergence triggers a sell trade when price breaks the previous low.

    • A bullish divergence triggers a buy trade when price breaks the previous high.

  • Invalidation:

    • A bearish divergence is invalidated if price breaks the previous high, triggering a buy trade.

    • A bullish divergence is invalidated if price breaks the previous low, triggering a sell trade.

This ensures that the EA adapts dynamically to both divergence confirmations and their potential failures, capturing profitable opportunities in both cases.

EA Input Parameters

1. General Trading Parameters


  • EntryTimeframe (ENUM_TIMEFRAMES) – Defines the candle close timeframe for trade execution.

  • InvalidationEntry (bool) – If enabled, the EA trades both the validation and invalidation of a divergence:

    • For bearish divergence: Executes a sell when price breaks the previous low and a buy if price breaks the previous high.

    • For bullish divergence: Executes a buy when price breaks the previous high and a sell if price breaks the previous low.

  • Magic (int) – Unique magic number to differentiate EA trades from other trades.

2. Risk Management Parameters

  • RiskAmount (int) – The amount of risk per trade, defined in account currency (cash).

    • The EA calculates position size based on this risk amount.

  • RiskReward (double) – The risk-reward ratio of the trade.

    • Trade Execution Logic:

      • For bearish divergence:

        • Entry: Previous low breakout

        • Stop Loss (SL): Previous high

        • Take Profit (TP): Based on RiskReward ratio (e.g., if Risk = 100 pips and RR = 2, TP = 200 pips).

      • For bullish divergence:

        • Entry: Previous high breakout

        • Stop Loss (SL): Previous low

        • Take Profit (TP): Based on RiskReward ratio.

3. MACD Calculation Parameters

  • FastEMA (int) – The period of the fast-moving average in MACD calculation.

  • SlowEMA (int) – The period of the slow-moving average in MACD calculation.

  • SignalEMA (int) – The period of the signal line in MACD calculation.

  • AppliedPrice (ENUM_APPLIED_PRICE) – The applied price for calculating MACD (e.g., Close, Open, High, Low, etc.).

4. Divergence Identification Parameters

  • HighLowThreshold (int) – Defines how many candles are required for a high/low to be considered significant on price.

    • If no valid high/low is found, the threshold is gradually reduced to identify the most relevant extremum.

  • DivergenceThreshold (int) – Defines how many candles are required for a high/low to be considered significant on MACD.

    • Unlike the HighLowThreshold, this threshold is strictly enforced.

  • DivergenceInvalidationThreshold (double) – A filter to determine when a divergence is invalidated:

    • Example: If set to 0.01, a bearish divergence is invalidated if the MACD signal line touches 0.01.

    • If the MACD signal line touches -0.01, a bullish divergence is invalidated.

5. Visualization & Alerts

  • DrawPriceTrendLines (int) – Enables drawing divergence lines on price to visually highlight divergence setups.

  • DrawIndicatorTrendLines (int) – Enables drawing divergence lines on MACD to confirm divergence signals.

  • DrawIndicatorEntryLines (int) – Enables drawing entry confirmation lines based on divergence signals.

  • DisplayAlert (int) – Placeholder for alert functionality (not applicable in this version).

How the EA Works

  1. Detect Divergence:

    • The EA scans price and MACD to identify valid bullish or bearish divergences based on user-defined thresholds.

  2. Validate Entry Conditions:

    • The EA enters a trade when the divergence is confirmed OR when it is invalidated.

  3. Calculate Risk & Position Size:

    • The EA calculates the lot size based on the RiskAmount and RiskReward ratio.

  4. Set Stop Loss and Take Profit:

    • SL and TP are set based on previous price extremes and RiskReward.

  5. Draw Visual Aids:

    • The EA draws trendlines on the price chart and MACD indicator to help visualize detected divergences.

  6. Trade Execution & Management:

    • Trades are placed based on divergence validation or invalidation, with automated SL and TP placement.

This EA combines the power of the MACD Divergence Indicator with robust automation and risk control, offering a reliable and systematic approach to trading divergences.




Recently Viewed

500 $375 $ FTMO passing EA High risk MT4
Shokhboz Mamarasulov
378 $284 $ Al Pivot Assistant PRO 4
Tjia Elisabeth Jasmine Canadi
90 $68 $ HFT Prop Pass
Ariunbaatar Gunge Sersendemid
Results 1 - 3 of 3

30-Day Money Back Guarantee

If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@fx-market.pro.
Refund requests received more than 30 days after purchase will be rejected.

Email Us Now! Support is available 24/7
by Email: support@fx-market.pro

Do You Need Help?
Click Here To Start Live Chat

Contact Us

Image

Search