
Multiple Indicator Confluence Trading Strategies EA MT4/MT5 BACKTESTS & NEW OPTIMIZED SET FILES

This documentation provides a clear and comprehensive guide to the Multi Indicator Strategy Expert Advisor (EA), designed for both MT4 and MT5 platforms. The EA integrates multiple technical indicators to generate robust trading signals, offering traders flexibility to customize strategies based on market conditions. Users can enable or disable indicators, configure entry and exit strategies, and apply combination modes (AND, OR, NA) to tailor signal generation. The EA also includes a Moving Average trend filter, loss recovery strategies, and time/day filters for enhanced trading control. Available at:
- MT4 Version: Multi Indicator Signal EA MT4
- MT5 Version: Multi Indicator Strategy EA MT5
1. Indicator Settings
1.1 ADX Settings
Core Parameters:
- ADX1_TIMEFRAME: Timeframe for ADX calculation. Default: PERIOD_CURRENT
- ADX1_PERIOD: Periods for ADX calculation. Default: 8
- ADX1_PRICE_TYPE: Price type (e.g., Close, Open). Default: PRICE_CLOSE
- ADX1_MA_METHOD: Moving average method (e.g., SMA, EMA). Default: MODE_SMA
- ADX1_LEVEL: ADX threshold level. Default: 20
Entry Strategies (adxEntryStrategy):
- Disable Entry Strategy: No ADX entry signals.
- Cross Above Level: Buy when ADX crosses above level; sell when below.
- Cross Below Level: Buy when ADX crosses below level; sell when above.
- PDI Cross Above MDI: Buy when +DI crosses above -DI; sell when below.
- ADX Greater Than Level: Buy when ADX is above level; sell when below.
- PDI Greater Than MDI: Buy when +DI is above -DI; sell when below. Default: PDI Greater Than MDI
Exit Strategies (adxExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.2 Bollinger Bands Settings
Core Parameters:
- BOLLINGER_BAND1_TIMEFRAME: Timeframe for Bollinger Bands. Default: PERIOD_CURRENT
- BOLLINGER_BAND1_PERIOD: Periods for calculation. Default: 20
- BOLLINGER_BAND1_DEVIATION: Standard deviation multiplier. Default: 2
- BOLLINGER_BAND1_SHIFT: Band shift. Default: 0
- BOLLINGER_BAND1_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
Entry Strategies (bollingerEntryStrategy):
- Disable Entry Strategy: No Bollinger signals.
- Reversal at Lower Band: Buy on reversal at lower band; sell at upper band.
- Price Crossed Upper Band: Buy when price crosses upper band; sell when lower.
- Price Above Upper Band: Buy when price is above upper band; sell when below.
- Price Below Lower Band: Buy when price is below lower band; sell when above.
- Price Above Middle Band: Buy when price is above middle band; sell when below. Default: Reversal at Lower Band
Exit Strategies (bollingerExitStrategy):
- Disable Exit Strategy: No exit signals.
- Reversal at Upper Band: Buy-exit on reversal at upper band; sell-exit at lower.
- Price Crossed Lower Band: Buy-exit when price crosses lower band; sell-exit when upper.
- Price Crossed Below Middle Band: Buy-exit when price crosses below middle band; sell-exit when above.
- Price Above Upper Band: Buy-exit when price is above upper band; sell-exit when below.
- Price Below Lower Band: Buy-exit when price is below lower band; sell-exit when above.
- Price Above Middle Band: Buy-exit when price is above middle band; sell-exit when below. Default: Disable Exit Strategy
1.3 CCI Settings
Core Parameters:
- CCI1_TIMEFRAME: Timeframe for CCI. Default: PERIOD_CURRENT
- CCI1_PERIOD: Periods for calculation. Default: 14
- CCI1_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
- CALCULATION_MODE: Manual or auto level calculation. Default: MANUAL
- CCI1_UPPER_LEVEL: Overbought threshold. Default: 100
- CCI1_LOWER_LEVEL: Oversold threshold. Default: -100
Entry Strategies (cciEntryStrategy):
- Disable Entry Strategy: No CCI signals.
- Enters Oversold: Buy when CCI enters oversold; sell when overbought.
- Exits Oversold: Buy when CCI exits oversold; sell when exits overbought.
- Enters Overbought: Buy when CCI enters overbought; sell when oversold.
- Above Upper Level: Buy when CCI is above upper level; sell when below.
- Below Lower Level: Buy when CCI is below lower level; sell when above.
- Cross Above Zero: Buy when CCI crosses above zero; sell when below. Default: Disable Entry Strategy
Exit Strategies (cciExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.4 MACD Settings
Core Parameters:
- MACD1_TIMEFRAME: Timeframe for MACD. Default: PERIOD_CURRENT
- MACD1_SHORT_PERIOD: Fast EMA periods. Default: 12
- MACD1_LONG_PERIOD: Slow EMA periods. Default: 26
- MACD1_SIGNAL_PERIOD: Signal line periods. Default: 9
- MACD1_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
Entry Strategies (macdEntryStrategy):
- Disable Entry Strategy: No MACD signals.
- Bull Cross Below Zero: Buy on bullish MACD cross below zero; sell on bearish cross above.
- Bull Cross Above Zero: Buy on bullish cross above zero; sell on bearish cross above.
- Cross Above Zero: Buy when MACD crosses above zero; sell when below.
- Above Signal Line: Buy when MACD is above signal line; sell when below.
- Above Zero Line: Buy when MACD is above zero; sell when below. Default: Disable Entry Strategy
Exit Strategies (macdExitStrategy): Similar to entry, with sell-exit focus (e.g., bear cross below zero). Default: Disable Exit Strategy
1.5 Moving Average Settings
MA Crossover Settings:
- Configures two MAs (fast and slow) for crossover strategies.
MA 1 Settings (Fast MA):
- MA1_TIMEFRAME: Timeframe. Default: PERIOD_CURRENT
- MA1_MODE: MA method. Default: MODE_EMA
- MA1_PERIOD: Periods. Default: 10
- MA1_SHIFT: Shift. Default: 0
- MA1_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
MA 2 Settings (Slow MA):
- Same as MA 1, with MA2_PERIOD: Default: 30
Entry Strategies (maEntryStrategy):
- Disable Entry Strategy: No MA signals.
- Fast MA Cross Above Slow: Buy on fast MA crossing above slow; sell when below.
- Bullish Pullback on Fast MA: Buy on bullish pullback to fast MA; sell on bearish.
- Bullish Pullback on Slow MA: Buy on bullish pullback to slow MA; sell on bearish.
- Fast MA Above Slow: Buy when fast MA is above slow; sell when below.
- Price Above Fast MA: Buy when price is above fast MA; sell when below.
- Price Above Slow MA: Buy when price is above slow MA; sell when below. Default: Disable Entry Strategy
Exit Strategies (maExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.6 RSI Settings
Core Parameters:
- RSI1_TIMEFRAME: Timeframe. Default: PERIOD_CURRENT
- RSI1_PERIOD: Periods. Default: 8
- RSI1_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
- RSI_CALCULATION_MODE: Manual or auto levels. Default: RSI_AUTO
- RSI1_UPPER_LEVEL: Overbought threshold. Default: 60
- RSI1_LOWER_LEVEL: Oversold threshold. Default: 40
Entry Strategies (rsiEntryStrategy):
- Disable Entry Strategy: No RSI signals.
- Enters Oversold: Buy when RSI enters oversold; sell when overbought.
- Exits Oversold: Buy when RSI exits oversold; sell when exits overbought.
- Enters Overbought: Buy when RSI enters overbought; sell when oversold.
- Below Lower Level: Buy when RSI < lower level; sell when > upper level.
- Cross Above 50: Buy when RSI crosses above 50; sell when below.
- Above Upper Level: Buy when RSI is above upper level; sell when below. Default: Disable Entry Strategy
Exit Strategies (rsiExitStrategy):
- Disable Exit Strategy: No exit signals.
- Enters Overbought: Buy-exit when RSI enters overbought; sell-exit when oversold.
- Exits Overbought: Buy-exit when RSI exits overbought; sell-exit when exits oversold.
- Enters Oversold: Buy-exit when RSI enters oversold; sell-exit when overbought.
- Above Upper Level: Buy-exit when RSI > upper level; sell-exit when < lower level.
- Cross Below 50: Buy-exit when RSI crosses below 50; sell-exit when above.
- Below Lower Level: Buy-exit when RSI is below lower level; sell-exit when above. Default: Disable Exit Strategy
1.7 Stochastic Settings
Core Parameters:
- STOCHASTIC1_TIMEFRAME: Timeframe. Default: PERIOD_CURRENT
- STOCHASTIC1_KPERIOD: %K period. Default: 14
- STOCHASTIC1_DPERIOD: %D period. Default: 3
- STOCHASTIC1_SLOWING: Slowing factor. Default: 3
- STOCHASTIC1_MA_METHOD: MA method. Default: MODE_SMA
- STOCHASTIC1_PRICE_FIELD: Price type. Default: STO_LOWHIGH
- STOCHASTIC_CALCULATION_MODE: Manual or auto levels. Default: STOCHASTIC_MANUAL
- STOCHASTIC1_UPPER_LEVEL: Overbought threshold. Default: 80
- STOCHASTIC1_LOWER_LEVEL: Oversold threshold. Default: 20
Entry Strategies (stochasticEntryStrategy):
- Disable Entry Strategy: No Stochastic signals.
- Enters Oversold: Buy when %K enters oversold; sell when overbought.
- Exits Oversold: Buy when %K exits oversold; sell when exits overbought.
- Enters Overbought: Buy when %K enters overbought; sell when oversold.
- Crossover Below Oversold: Buy on %K/%D crossover below oversold; sell above overbought.
- %K Cross Above 50: Buy when %K crosses above 50; sell when below.
- %K Above Upper Level: Buy when %K is above upper level; sell when below. Default: Disable Entry Strategy
Exit Strategies (stochasticExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.8 Awesome Oscillator Settings
Core Parameters:
- AWSOME_OSCILATOR1_TIMEFRAME: Timeframe. Default: PERIOD_CURRENT
Entry Strategies (aoEntryStrategy):
- Disable Entry Strategy: No AO signals.
- Cross Above Zero: Buy when AO crosses above zero; sell when below.
- Above Zero: Buy when AO is above zero; sell when below.
- Saucer Pattern Above Zero: Buy on bullish saucer pattern; sell on bearish. Default: Disable Entry Strategy
Exit Strategies (aoExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.9 RVI Settings
Core Parameters:
- RVI1_TIMEFRAME: Timeframe. Default: PERIOD_CURRENT
- RVI1_PERIOD: Periods. Default: 10
- RVI1_UPPER_LEVEL: Upper threshold. Default: 0.4
- RVI1_LOWER_LEVEL: Lower threshold. Default: -0.4
Entry Strategies (rviEntryStrategy):
- Disable Entry Strategy: No RVI signals.
- Main Cross Above Signal: Buy when main line crosses above signal; sell when below.
- Main Cross Above Upper Level: Buy when main crosses above upper level; sell when below lower level.
- Main Above Upper Level: Buy when main is above upper level; sell when below lower level. Default: Disable Entry Strategy
Exit Strategies (rviExitStrategy): Same as entry strategies. Default: Disable Exit Strategy
1.10 Trend Moving Average Settings
Core Parameters:
- ENABLE_MA_FILTER: Enable trend filter. Default: false
- MA3_TIMEFRAME: Timeframe. Default: PERIOD_H4
- MA3_MODE: MA method. Default: MODE_EMA
- MA3_PERIOD: Periods. Default: 50
- MA3_SHIFT: Shift. Default: 0
- MA3_APPLIED_PRICE: Price type. Default: PRICE_CLOSE
Trend Filter:
- Uptrend: Allows buy trades when close price is above MA3.
- Downtrend: Allows sell trades when close price is below MA3.
1.11 Indicator Combination Settings
The inputs listed are part of the Indicator Combination Settings in your Multi Indicator Strategy Expert Advisor (EA) for MT4/MT5. They define how each indicator (ADX, Bollinger Bands, CCI, MACD, Moving Average, RSI, Stochastic, Awesome Oscillator, and RVI) contributes to generating trade signals (buy/sell entries and exits) through the ENUM_COMBINATION_MODE enum. These inputs allow traders to customize the signal logic by specifying whether an indicator’s signal is required (AND), optional (OR), or excluded (NA) when combining signals from multiple indicators. Below is a detailed explanation of these inputs and their role in the EA.
Enum Definition: ENUM_COMBINATION_MODE
The ENUM_COMBINATION_MODE enum provides three options for combining indicator signals:
- COMBINATION_OR (0): The indicator’s signal is optional. If the indicator generates a buy or sell signal, it contributes to the final signal, but its signal is not mandatory. The EA triggers a trade if any OR-mode indicator signals, provided other conditions (e.g., AND-mode indicators) are met.
- COMBINATION_AND (1): The indicator’s signal is mandatory. The EA only triggers a trade if all AND-mode indicators generate the corresponding buy or sell signal. This ensures stricter confirmation.
- COMBINATION_NA (3): The indicator is excluded from signal generation. Its signals are ignored, effectively disabling its influence on trade decisions without disabling the indicator entirely.
Input Parameters
Each input corresponds to one indicator and determines its combination mode:
- adxCombinationMode: Sets the combination mode for ADX signals. Default: COMBINATION_AND (ADX signal is required for trades).
- bollingerCombinationMode: Sets the mode for Bollinger Bands. Default: COMBINATION_AND (Bollinger signal is required).
- cciCombinationMode: Sets the mode for CCI. Default: COMBINATION_NA (CCI is excluded from signal generation).
- macdCombinationMode: Sets the mode for MACD. Default: COMBINATION_NA (MACD is excluded).
- maCombinationMode: Sets the mode for Moving Average. Default: COMBINATION_NA (MA is excluded).
- rsiCombinationMode: Sets the mode for RSI. Default: COMBINATION_NA (RSI is excluded).
- stochasticCombinationMode: Sets the mode for Stochastic. Default: COMBINATION_NA (Stochastic is excluded).
- aoCombinationMode: Sets the mode for Awesome Oscillator. Default: COMBINATION_NA (AO is excluded).
- rviCombinationMode: Sets the mode for RVI. Default: COMBINATION_NA (RVI is excluded).
How They Work in the EA
These inputs control how the EA aggregates signals in the GetCombinedEntrySignals and GetCombinedExitSignals functions:
- Signal Generation: Each indicator’s entry/exit strategy (e.g., adxEntryStrategy, bollingerExitStrategy) produces a buy or sell signal based on its configured conditions (e.g., ADX PDI > MDI, Bollinger price above middle band).
- Combination Logic:
- AND-mode indicators (e.g., ADX, Bollinger with COMBINATION_AND): All must produce a buy signal for a buy trade (or sell for a sell trade). If any AND-mode indicator fails to signal, no trade is triggered unless OR-mode indicators compensate.
- OR-mode indicators: Any single OR-mode indicator signaling a buy/sell is sufficient to contribute to the final signal, provided all AND-mode indicators also signal.
- NA-mode indicators (e.g., CCI, MACD with COMBINATION_NA): Ignored in signal aggregation, allowing traders to focus on specific indicators.
- Final Signal: A buy signal is triggered if:
- All AND-mode indicators signal buy, and
- At least one OR-mode indicator signals buy (if any OR-mode indicators are active).
- NA-mode indicators have no impact. Similar logic applies for sell signals and exit signals.
Practical Examples
- Default Setup:
- ADX and Bollinger are COMBINATION_AND; others are COMBINATION_NA.
- For a buy entry:
- ADX must signal buy (e.g., PDI > MDI for ADX_ENTRY_STRATEGY6).
- Bollinger must signal buy (e.g., price above middle band for BOLLINGER_ENTRY_STRATEGY5).
- Other indicators (CCI, MACD, etc.) are ignored.
- Outcome: Strict confirmation requiring both ADX and Bollinger signals.
- Mixed AND/OR Setup:
- Set adxCombinationMode = COMBINATION_AND, bollingerCombinationMode = COMBINATION_AND, rsiCombinationMode = COMBINATION_OR, others COMBINATION_NA.
- For a buy entry:
- ADX and Bollinger must both signal buy.
- RSI may signal buy (optional). If RSI signals, it contributes to the buy signal.
- Outcome: Trade triggers if ADX and Bollinger signal, with RSI providing optional confirmation.
- All OR Setup:
- Set all to COMBINATION_OR.
- For a buy entry: Any single indicator (e.g., ADX, RSI, or Bollinger) signaling buy triggers a trade.
- Outcome: Flexible, less restrictive signal generation.
Usage Notes
- Customization: Use AND for critical indicators requiring confirmation, OR for supplementary signals, and NA to exclude indicators without disabling their strategies.
- Default Behavior: With ADX and Bollinger as AND and others as NA, the EA focuses on strong trend (ADX) and volatility (Bollinger) confirmation.
- Performance: NA mode reduces computational load by skipping unnecessary checks.
- Strategy Alignment: Ensure entry/exit strategies (e.g., adxEntryStrategy) are enabled (not STRATEGY0) for indicators with AND/OR modes to avoid null signals.
Recommendations
- Testing: Test combination modes in backtesting to balance signal frequency and reliability.
- Indicator Selection: Enable AND for high-confidence indicators (e.g., ADX for trend) and OR for momentum indicators (e.g., RSI, CCI).
- Monitoring: Check logs to ensure signals align with configured modes.
3. Additional Features
- Loss Recovery Strategies (Grid, Hedge, Martingale): Optional, mutually exclusive, disabled by default. Grid/Hedge disable stop-loss.
- Position Sizing Based on Profit: Dynamically adjusts lot size based on cumulative profit.
- Day Filter: Restricts trading on specific days (optional).
- Time Filter: Limits trading to specific hours (optional).
4. Advantages
- Customizable: Enable/disable indicators and configure strategies.
- Robust Signals: Multiple indicator confirmation reduces false signals.
- Trend Alignment: MA filter ensures trades align with market direction.
- Risk Management: Flexible exit strategies and recovery options.
This EA offers a powerful, user-friendly platform for traders to build sophisticated strategies tailored to their needs.
The EA can be back tested with various different strategies with the help of different combinations of these options
- Stop-Loss and Take-Profit
- Single or Multiple Entry (Multiple entries is not suitable for Grid)
- Entry Option
- Exit Option (Not suitable for Grid, Hedge and Martingale) (Enable/Disable)
- Time Filter (Enable/Disable)
- Day Filter (Enable/Disable)
- Breakeven (Enable/Disable)
- Trailing Stop-Loss (Enable/Disable)
- Daily, Weekly and Monthly Profit
- Grid (Enable/Disable) with no stoploss
- Hedge (Enable/Disable) with no stoploss
- Martingale (Enable/Disable) with no stoploss
- Higher timeframe Moving Average Trend Filter (Enable/Disable)
We have optimized our EA based on these different combinations in different timeframes (5Minute to 4 Hours). These optimizations are mainly performed on EURUSD, USDCHF, AUDUSD, GBPUSD, USDCAD, NZDUSD AND XAUUSD. We have run these optimizations on 4-10 years of data. You can find the optimized set files and results below.
Note: We have run the optimizations on every period calculation for faster results. In this approach calculation are perform on every candle loading. You can backtest on everytick mode, but backtest would be much slower. Optimization results may be different in different brokers. It depends on the mt5 data cache and specific broker data. Ideally mt5 has 99.99 tick quality data. For mt4 you need to purchase 99.99 quality data from specific providers. Each individual has their own preference of their settings and symbols. In case you need more optimized data you can always optimize yourself.
You can follow this video to learn how to optimize the EA.
Download New Optimized MT4 set files here
Download New Optimized MT5 set files here