Moving Average Crossover STRATEGY EA MT4/MT5 Settings/Inputs Guide

Moving Average Crossover STRATEGY EA MT4/MT5 Settings/Inputs Guide

20 June 2024, 09:15
Biswarup Banerjee
0
556

Moving Average Expert Advisor Documentation

This Expert Advisor (EA) leverages a dual Moving Average (MA) strategy to identify potential trends and execute trades. It compares two MAs with configurable settings, such as timeframe, period, shift, method, and applied price. Alongside the core MA-based strategy, the EA supports advanced features such as grid recovery, hedge, martingale strategies, position sizing, and day and time filters, enhancing its adaptability to various market conditions.

We divide our input sections into two parts. The first part is indicator-related settings, which you can find at the bottom side of the EA inputs. All other settings are common for every EA we make. We call these additional features. You can find the detailed documentation of these settings in this link.

MT4 version is available here  Moving Average Crossover EA MT4

MT5 version is available here  Moving Average Crossover EA MT5

1. Moving Average 1 Settings

Moving Average 1 Input Parameters

  • MA1_TEXT_1 - Divider text for visual clarity in the input section. (Not important for EA calculation)
  • MA1_TEXT - Text label for Moving Average 1 settings. (Not important for EA calculation)
  • MA1_TEXT_2 - Divider text for visual clarity in the input section. (Not important for EA calculation)
  • MA1_TIMEFRAME - Selects the timeframe for MA 1 calculation. Default: PERIOD_CURRENT .
  • MA1_MODE - Specifies the MA method (e.g., Simple, Exponential, Smoothed, Linear Weighted). Default: MODE_EMA .
  • MA1_PERIOD - Defines the period for MA 1 calculation. Default: 10 .
  • MA1_SHIFT - Sets the shift for the MA line. Default: 0 .
  • MA1_APPLIED_PRICE - Chooses the price type for MA 1 calculation (e.g., Close, Open, High, Low). Default: PRICE_CLOSE .

2. Moving Average 2 Settings

Moving Average 2 Input Parameters

  • MA2_TEXT_1 - Divider text for visual clarity in the input section. (Not important for EA calculation)
  • MA2_TEXT - Text label for Moving Average 2 settings. (Not important for EA calculation)
  • MA2_TEXT_2 - Divider text for visual clarity in the input section. (Not important for EA calculation)
  • MA2_TIMEFRAME - Selects the timeframe for MA 2 calculation. Default: PERIOD_CURRENT .
  • MA2_MODE - Specifies the MA method (e.g., Simple, Exponential, Smoothed, Linear Weighted). Default: MODE_EMA .
  • MA2_PERIOD - Defines the period for MA 2 calculation. Default: 30 .
  • MA2_SHIFT - Sets the shift for the MA line. Default: 0 .
  • MA2_APPLIED_PRICE - Chooses the price type for MA 2 calculation (e.g., Close, Open, High, Low). Default: PRICE_CLOSE .

Multiple Entry Strategies

The EA provides three different entry strategies based on Moving Average signals:

ENTRY_STRATEGY1 - MA Crossover Strategy

  • Buy Entry: When the fast MA crosses above the slow MA (bullish signal).
  • Sell Entry: When the fast MA crosses below the slow MA (bearish signal).
  • Best suited for traders who prefer breakout-based entries.

ENTRY_STRATEGY2 - Fast MA Pullback Strategy

  • Buy Entry: When the price pulls back to the fast MA and bounces upwards.
  • Sell Entry: When the price pulls back to the fast MA and reverses downwards.
  • Ideal for traders who want to enter trades after a short-term retracement.

ENTRY_STRATEGY3 - Slow MA Pullback Strategy

  • Buy Entry: When the price pulls back to the slow MA and bounces upwards.
  • Sell Entry: When the price pulls back to the slow MA and reverses downwards.
  • Best for traders who want to trade off larger trend retracements.

Multiple Exit Strategies

The EA provides four different exit strategies:

EXIT_STRATEGY1 - MA Crossover Exit

  • Buy Exit: When the fast MA crosses below the slow MA (bearish signal).
  • Sell Exit: When the fast MA crosses above the slow MA (bullish signal).
  • Best for trend-following traders who want to ride full trends.

EXIT_STRATEGY2 - Fast MA Pullback Exit

  • Buy Exit: When the price pulls back to the fast MA and breaks below it.
  • Sell Exit: When the price pulls back to the fast MA and breaks above it.
  • Provides early exits based on short-term trend shifts.

EXIT_STRATEGY3 - Slow MA Pullback Exit

  • Buy Exit: When the price pulls back to the slow MA and breaks below it.
  • Sell Exit: When the price pulls back to the slow MA and breaks above it.
  • Useful for traders looking for exits at deeper retracements.

EXIT_STRATEGY4 - Disable Automatic Exits

  • No automatic exits, allowing manual trade management or external exit strategies.

2. Additional Features

Moving Average (MA) Filter on Higher Timeframe

The MA filter enables trades that align with the broader trend based on a higher timeframe moving average:

  • Uptrend Condition - Allows buy trades when the close price is above the moving average.
  • Downtrend Condition - Allows sell trades when the close price is below the moving average.

Loss Recovery Strategies

There are couple of loss recovery strategies popular in the market. Grid, Hedge and Martingale is most popular among them. In this EA, we have these strategies inbuilt. But only one loss recovery strategy can be active at a time. EA will not load, if we enable more than one loss recovery strategies. There is one important point regarding these strategies, we can not set stoploss if you enable Grid or Hedge strategy. It will close trades earlier and will compromise the purpose of these strategies. All of these strategies are by default disabled.

Grid Recovery Strategy
In a losing position, the EA places additional trades in a grid pattern, averaging down the entry price to capitalize on retracements.
Hedge Strategy
To balance exposure during a losing position, the EA opens opposing trades (hedges), allowing profit potential in countertrend movements.
Martingale Strategy
Increases lot size after a loss on each subsequent signal, aiming for overall profitability.


Position Sizing Based on Profit
This feature adjusts the position size dynamically based on cumulative profit, aiming to optimize gains in favourable conditions. As profit accumulates, the EA increases the position size, allowing for scaled growth and larger potential returns.


Day Filter
Specifies trading days to avoid trading during specific days of the week, aligning with your strategy’s optimal market conditions. You can disable the entire day filter.


Time Filter
Limits trading to specific times, preventing trades during low-liquidity periods or other non-ideal market conditions. You can disable entire time filter.


This ADX-based EA, with versatile entry and exit strategies and advanced risk management features, is a comprehensive tool designed to adapt to various market conditions while offering robust control over trading operations. Use each feature thoughtfully to align with your trading objectives and risk management strategy.

 

Download Optimized set files here