MACD TRADING STRATEGIES EA MT4/MT5 Settings/Inputs Guide

MACD TRADING STRATEGIES EA MT4/MT5 Settings/Inputs Guide

18 October 2024, 05:00
Biswarup Banerjee
0
1 734

MT4 Version: MACD Strategy EA MT4

MT5 Version: MACD Strategy EA MT5

Complete User Documentation — MT4 & MT5

1. OVERVIEW

The MACD Strategy EA utilizes the Moving Average Convergence Divergence (MACD) indicator to automate trading decisions based on market momentum and trend strength. It addresses the challenge of timely entry and exit points, allowing traders to capitalize on market movements without constant monitoring. This EA is ideal for traders looking to enhance their strategy with automated execution.

Who Should Use It: This EA is suitable for both novice and experienced traders who prefer a systematic approach to trading and want to leverage MACD signals for better market timing.

Main Benefit: Automate your trading strategy with precision, reducing emotional decision-making and increasing the potential for consistent profits.


2. INPUT PARAMETERS & SETTINGS

This product shares a common set of general input settings with all Expert Advisor products in this series. The following sections are covered in the common guide: General Settings (lot size, SL/TP modes, magic number, trade direction), Breakeven Settings, Trailing Stop Settings, News Filter Settings and News Action Settings, Martingale Settings, Grid Settings, Hedge Settings, Risk Settings, Position Sizing, Alert Settings, Display Settings, Trade Time Settings, Trade Days Settings, Safeguard Settings, and Trend Filter Settings (MA Filter, ADX Filter, RSI Filter, MACD Filter, Parabolic SAR Filter — each with their own strategy options). All of these are fully documented in the Common General Input Settings for Expert Advisors. The sections below cover only the product-specific inputs unique to this product.

Macd Settings

This section controls the MACD settings, including its timeframe, periods, entry, and exit strategies, allowing traders to customize their approach based on market conditions.

Setting Name Type Default Value Description Example
Macd Timeframe ENUM PERIOD_CURRENT Select the timeframe for the MACD calculation, which influences the sensitivity of the signals generated. M1 - Use for scalping strategies where quick signals are needed.
Macd Short Period int 12 Defines the short period for the MACD calculation, affecting the responsiveness of the indicator. 10 - A shorter period can provide quicker signals but may generate false positives.
Macd Long Period int 26 Sets the long period for the MACD calculation, influencing the smoothing of the signals. 30 - A longer period can reduce noise and provide more reliable signals.
Macd Signal Period int 9 Determines the period for the signal line in the MACD, affecting trade entry and exit timing. 8 - Adjusting this can help fine-tune the timing of your trades.
Macd Applied Price ENUM PRICE_CLOSE Select the price type used for the MACD calculation, which can impact the accuracy of signals. PRICE_OPEN - Useful for strategies focused on opening price movements.
Macd Entry Strategy ENUM ENTRY_STRATEGY1 Select the strategy for entering trades based on MACD signals, allowing customization of entry conditions. ENTRY_STRATEGY3 - Use for a more aggressive approach to capture trends.
Macd Exit Strategy ENUM EXIT_STRATEGY0 Choose the exit strategy for trades based on MACD signals, helping to lock in profits or minimize losses. EXIT_STRATEGY1 - Effective for traders looking to exit at the first sign of reversal.

Macd Entry Strategy — Options Explained

This setting allows traders to select their preferred method for entering trades based on MACD signals. Different strategies can be employed to align with various trading styles.

ENTRY_STRATEGY0: Disables the entry strategy, meaning no trades will be executed based on MACD signals.
ENTRY_STRATEGY1: Initiates a buy when the MACD crosses below zero and a sell when it crosses above zero, capturing momentum shifts.
ENTRY_STRATEGY2: Triggers a buy when the MACD crosses above zero and a sell when it crosses below, focusing on positive momentum.
ENTRY_STRATEGY3: Executes a buy on a MACD cross above the signal line and a sell on a cross below, emphasizing trend changes.
ENTRY_STRATEGY4: Buys when the MACD is above the signal line and sells when below, ensuring trades align with momentum.
ENTRY_STRATEGY5: Activates buys when the MACD is above the zero line and sells when below, capitalizing on bullish trends.
ENTRY_STRATEGY6: Identifies bullish divergences for buys and bearish divergences for sells, focusing on reversal signals.

Macd Exit Strategy — Options Explained

This setting allows traders to define how they exit trades based on MACD signals. Proper exit strategies are crucial for maximizing profits and minimizing losses.

EXIT_STRATEGY0: Disables the exit strategy, leaving trades open until manually closed.
EXIT_STRATEGY1: Closes trades when the MACD crosses below zero for sells and above for buys, capturing momentum shifts.
EXIT_STRATEGY2: Exits trades when the MACD bears cross below zero for buys and above for sells, focusing on negative momentum.
EXIT_STRATEGY3: Triggers exits when the MACD crosses below the signal line for buys and above for sells, emphasizing trend reversals.
EXIT_STRATEGY4: Closes trades when the MACD is below the signal line for buys and above for sells, ensuring trades align with momentum shifts.
EXIT_STRATEGY5: Exits trades when the MACD is below the zero line for buys and above for sells, focusing on bearish trends.
EXIT_STRATEGY6: Identifies bullish divergences for exits on sells and bearish divergences for buys, targeting reversal signals.

Macd Divergence Settings(only For Strategy 7)

This section contains settings specific to divergence detection for strategy 7, allowing traders to customize their approach to identifying potential reversals.

Setting Name Type Default Value Description Example
Divergence Lookback Bars int 50 Sets the number of bars to look back for identifying divergences, impacting the effectiveness of the strategy. 40 - Reducing this value can increase sensitivity to recent price movements.
Minimum Bars distance between divergence[0: disable] int 20 Defines the minimum distance between divergence points, which can filter out weaker signals. 15 - A smaller gap may help capture more divergence opportunities.
Maximum Bars distance between divergence[0: disable] int 200 Sets the maximum distance between divergence points, which can affect the strength of signals. 250 - Increasing this might capture longer-term divergences.
Min price gap in pips[0: disable] int 15 Defines the minimum price difference in pips for valid divergences, helping to filter noise. 10 - A smaller value may increase the number of signals but could reduce quality.
MACD Color color clrBlue Sets the color for the MACD indicator on the chart, allowing for better visualization. clrRed - Changing the color can help distinguish between multiple indicators.

3. HOW IT WORKS

Core Calculation & Logic

This Expert Advisor calculates the Moving Average Convergence Divergence (MACD) to identify momentum shifts in the market. It utilizes multiple strategies to determine optimal entry and exit points based on market trends.

By analyzing price movements and the MACD indicator, the EA detects bullish and bearish trends, allowing traders to capitalize on potential market reversals or continuations.

Entry Strategies Explained

MACD Crossovers

BUY Signal: When the MACD line crosses above the signal line, indicating bullish momentum.

SELL Signal: When the MACD line crosses below the signal line, indicating bearish momentum.

Best For: Trending markets where momentum is strong and consistent.

Step-by-Step Workflow

Step 1: Install the EA Download and install the MACD Strategy EA on your trading platform.

Step 2: Configure Settings Adjust the input parameters according to your trading preferences and risk tolerance.

Step 3: Attach to Chart Attach the EA to the desired currency pair chart and timeframe.

Step 4: Monitor Trades Observe the EA as it executes trades based on the MACD signals.

Step 5: Analyze Performance Review the trading history and performance metrics to evaluate the EA's effectiveness.


4. RISK MANAGEMENT FEATURES

This section outlines the risk management features integrated into the MACD Strategy EA.

Feature Description
Lot Size Defines the size of each trade, allowing traders to manage their exposure based on account balance.
Stoploss Sets a predetermined price level to limit potential losses on a trade, protecting capital.
Take Profit Specifies a price level at which profits will be automatically taken, securing gains.
Risk Reward Ratio Allows traders to define a risk-reward ratio to ensure that potential profits outweigh potential losses.
Magic Number Identifies trades executed by the EA, enabling better management of multiple strategies or EAs.

Quick Start Guide

Follow these steps to get started in under 5 minutes:

  1. Download the EA: Get the MACD Strategy EA from the official website.
  2. Install on Platform: Add the EA to your MetaTrader platform.
  3. Open Chart: Select a currency pair and timeframe for trading.
  4. Set Parameters: Adjust the input settings to match your trading strategy.
  5. Attach EA: Drag and drop the EA onto the chart to activate it.
  6. Enable Auto Trading: Ensure that auto trading is enabled in your platform settings.
  7. Monitor Performance: Keep an eye on the trades executed by the EA for adjustments.

You may also be interested in these related products:


Installation Guide for MQL Products | Updating Purchased MQL Products on MT4/MT5 | General Troubleshooting Guide | Backtest and Set Files

Check all my products: https://www.mql5.com/en/users/biswait50/seller

Contact me for support: https://www.mql5.com/en/users/biswait50