Dual Engulfing Pro MT5 Candle Signals Multi Filter
- インディケータ
- バージョン: 1.11
- アクティベーション: 5
### Product Overview
The Engulfing Dual-Engine and Multi-Filter Confirmation Indicator for MetaTrader 5 is a specialized technical analysis analytical tool engineered to identify directional engulfing candlestick patterns across global financial markets. Developed for quantitative analysts, discretionary traders, and algorithmic strategy designers, the software categorizes engulfing structures into two distinct computational classifications: Standard Retail Engulfing and Advanced Institutional Engulfing. Rather than evaluating candlestick geometry as an isolated variable, the indicator incorporates a modular confirmation framework featuring 14 independent technical filters. This architecture enables users to cross-validate raw price action against directional momentum shifts, baseline moving averages, volatility expansion thresholds, structural horizontal boundaries, and dynamic Fibonacci golden zones before any visual arrow is plotted or notification dispatched.
The indicator operates deterministically on closed candle data (Bar 1 indexing). This mathematical structure ensures that plotted arrow signals, internal data buffers, and multi-channel alerts remain completely static once a candle completes. No plotted values shift, recalculate, or repaint across historical chart data. The software exposes four discrete numeric indicator buffers, facilitating direct integration into automated trading systems, Expert Advisors (EAs), and multi-symbol scanner utilities via the native iCustom programmatic interface.
### Operating Principles and Candlestick Pattern Logic
The indicator evaluates market dynamics through two distinct candlestick geometry models coupled with a multi-layered validation architecture:
1. Retail Engulfing Model (Standard Structure)
The retail pattern detects conventional two-bar reversal formations where the real body of the current candle completely covers the real body of the immediately preceding candle:
- Bullish Retail Setup: Bar [1] must be a bearish candle (Close < Open), and Bar [0] must close as a bullish candle (Close > Open). The open price of Bar [0] must be less than or equal to the close of Bar [1], while the close of Bar [0] must be greater than or equal to the open of Bar [1]. When directional trend context is enabled (InpRetailRequireTrend = true), the algorithm requires a predefined sequence of consecutive opposing candles (default: 2 consecutive bearish candles) prior to the signal bar to confirm an active corrective or trend-reversal impulse.
- Bearish Retail Setup: Bar [1] must be a bullish candle (Close > Open), and Bar [0] must close as a bearish candle (Close < Open). The open price of Bar [0] must be greater than or equal to the close of Bar [1], while the close of Bar [0] must be less than or equal to the open of Bar [1]. When trend context is required, the setup must be preceded by a sequence of consecutive bullish candles (default: 2 consecutive bullish candles).
2. Institutional Engulfing Model (Advanced Liquidity Structure)
The institutional pattern expands upon classical geometry by enforcing five computational validation criteria that model aggressive volume injection and directional commitment from institutional market participants:
- Real Body Engulfment: The real body of the signal candle must encompass the real body of the preceding candle (Open[0] <= Close[1] and Close[0] >= Open[1] for bullish; Open[0] >= Close[1] and Close[0] <= Open[1] for bearish).
- Outside Bar Conformation: When full outside bar validation is active (InpRequireFullOutside = true), the extreme boundaries of the signal candle must completely exceed the prior bar (High[0] > High[1] and Low[0] < Low[1]). This reflects an initial liquidity sweep of previous extreme liquidity followed by decisive directional displacement.
- Body Expansion Ratio: The absolute body size of the signal candle (|Close - Open|) must equal or exceed the previous candle body multiplied by the user-defined multiplier (InpBodyMultiplier, default: 1.5x), identifying expansion velocity.
- Relative Volume Expansion: When active (InpRequireHigherVolume = true), the tick volume or real exchange volume of the signal bar must strictly exceed the volume of the preceding bar (Volume[0] > Volume[1]), confirming increased participant engagement.
- Decisive Close Placement: The close price must terminate within the extreme upper or lower percentage of the total candle range (High - Low). For bullish setups, the close must settle within the upper bracket (default: upper 30%, calculated as (Close - Low) / Range >= InpMinClosePosition = 0.70). For bearish setups, the close must settle within the lower bracket ((High - Close) / Range >= InpMinClosePosition = 0.70).
- Structural Preceding Context: When enabled (InpInstRequireTrend = true), the setup requires a sequence of consecutive opposing bars (InpInstTrendBars, default: 3 bars) to verify directional displacement against prior movement.
3. Signal Calculation and Non-Repainting Guarantee
Calculations are executed sequentially across historical bar data. Visual arrow signals and alert routines are evaluated at index bar 1 upon completion of the bar. Because all price relationships, moving averages, oscillator levels, and volume parameters are finalized when a bar closes, signals plotted on the chart and recorded in data buffers do not change. Historical chart evaluations reflect real-time live trading behavior.
### Modular 14-Filter Quantitative Confirmation Engine
The indicator features an onboard multi-filter engine comprising 14 modular technical filters. Traders can enable any single filter or combine multiple layers simultaneously. When multiple filters are active, the indicator enforces logical conjunction (AND logic), requiring all enabled conditions to be satisfied concurrently before a signal arrow is rendered:
1. Relative Strength Index (RSI) Cross Filter
- Logic: Monitors momentum transitions out of oversold or overbought extremes using standard RSI calculations.
- Buy Condition: RSI[current] crosses above Oversold threshold (default: 30.0) from RSI[prior] <= Oversold.
- Sell Condition: RSI[current] crosses below Overbought threshold (default: 70.0) from RSI[prior] >= Overbought.
- Purpose: Identifies momentum exhaustion and immediate reversal emergence from extended pricing boundaries.
2. Average Directional Index (ADX) Trend Strength Filter
- Logic: Assesses directional movement intensity regardless of direction using Wilder's directional system.
- Buy and Sell Condition: Main ADX line on the signal candle must equal or exceed ADX_Min_Level (default: 20.0).
- Purpose: Prevents signal generation during flat, directionless consolidation phases, restricting entries to conditions exhibiting sufficient directional velocity.
3. Single Moving Average (SMA / EMA) Baseline Filter
- Logic: Compares candle close relative to a single moving average calculated across a defined lookback period.
- Buy Condition: Candle Close is strictly greater than the Moving Average value.
- Sell Condition: Candle Close is strictly lower than the Moving Average value.
- Purpose: Enforces baseline trend alignment, ensuring bullish engulfing signals occur exclusively above the mean and bearish signals occur below the mean.
4. Ichimoku Kinko Hyo - Senkou Span B Filter
- Logic: Employs the longest equilibrium component of the Ichimoku system, Senkou Span B ((Highest High + Lowest Low) / 2 over 52 periods, shifted 26 bars).
- Buy Condition: Candle Close is positioned above the current Senkou Span B buffer value.
- Sell Condition: Candle Close is positioned below the current Senkou Span B buffer value.
- Purpose: Validates structural market polarity across medium-to-long term equilibrium cloud baselines.
5. RSI 75 Long-Term Momentum Filter
- Logic: Uses an extended 75-period RSI window to identify macro directional bias based on midline positioning.
- Buy Condition: RSI 75 value is greater than the neutral 50.0 level.
- Sell Condition: RSI 75 value is less than the neutral 50.0 level.
- Purpose: Establishes macro momentum filtering without lagging as severely as slow moving average crosses.
6. Double Moving Average Alignment Filter
- Logic: Measures spatial interaction between a faster Moving Average (MA A, default 30 EMA) and a slower Moving Average (MA B, default 140 EMA).
- Buy Condition: Fast MA value is strictly greater than the Slow MA value (Bullish Golden alignment).
- Sell Condition: Fast MA value is strictly lower than the Slow MA value (Bearish Death alignment).
- Purpose: Confirms intermediate-term trend structure and directional expansion before allowing setup execution.
7. Awesome Oscillator (AO) Multi-Condition Filter
- Logic: Calculates the difference between a 5-period SMA of median price and a 34-period SMA of median price.
- Sub-Filter Capabilities:
* Minimum Level Filter: Buy signals require AO value >= AO_Buy_Min (default: +4.0); Sell signals require AO value <= AO_Sell_Max (default: -4.0).
* Histogram Color / Slope Filter: Buy requires AO[current] > AO[prior]; Sell requires AO[current] < AO[prior].
* Zero-Line Positioning Filter: Buy requires AO > 0 and expanding upward; Sell requires AO < 0 and expanding downward.
- Purpose: Validates market drive and momentum acceleration across multiple sub-algorithmic rules.
8. Parabolic Stop and Reverse (SAR) Trend Filter
- Logic: Calculates trailing price acceleration points based on Step (0.02) and Maximum (0.2) parameters.
- Buy Condition: Candle Close is located above the current Parabolic SAR point.
- Sell Condition: Candle Close is located below the current Parabolic SAR point.
- Purpose: Verifies trade execution remains compliant with parabolic volatility trailing channels.
9. Commodity Channel Index (CCI) Trend Polarity Filter
- Logic: Assesses mean deviation over a broad 50-period window to detect structural trend direction relative to zero.
- Buy Condition: CCI(50) value is greater than 0.0.
- Sell Condition: CCI(50) value is less than 0.0.
- Purpose: Filters out setups occurring on the wrong side of statistical mean deviations.
10. Commodity Channel Index (CCI) Overbought & Oversold Filter
- Logic: Uses a standard 14-period CCI calculation to identify extreme price deviations from the statistical mean.
- Buy Condition: CCI(14) value is greater than the Overbought threshold (+100.0), indicating aggressive upside breakout velocity.
- Sell Condition: CCI(14) value is less than the Oversold threshold (-100.0), indicating aggressive downside breakout velocity.
- Purpose: Validates high-volatility breakout setups when momentum enters statistical tail zones.
11. Relative Vigor Index (RVI) Directional Trend Filter
- Logic: Measures the conviction of recent price action by comparing close-to-open change with high-to-low range across 75 periods.
- Buy Condition: RVI main value is greater than 0.0.
- Sell Condition: RVI main value is less than 0.0.
- Purpose: Verifies macro energy and directional accumulation.
12. Relative Vigor Index (RVI) Signal Line Cross Filter
- Logic: Evaluates short-term dynamic interactions between the RVI main line and its symmetric weighted signal line over 20 periods.
- Buy Condition: RVI Main line is strictly greater than the RVI Signal line.
- Sell Condition: RVI Main line is strictly lower than the RVI Signal line.
- Purpose: Captures micro-inflection crossovers and dynamic velocity shifts.
13. MACD Histogram and Zero-Level Dual Filter
- Logic: Employs standard moving average convergence divergence parameters (Fast EMA 12, Slow EMA 26, Signal SMA 9).
- Sub-Filter Capabilities:
* Histogram Filter: Buy requires MACD Main - MACD Signal > 0 (histogram positive); Sell requires MACD Main - MACD Signal < 0 (histogram negative).
* Zero-Level Filter: Buy requires MACD Main line > 0.0; Sell requires MACD Main line < 0.0.
- Purpose: Provides standard classical momentum verification and directional bias separation.
14. Rolling Support and Resistance Zone Filter
- Logic: Evaluates highest high and lowest low levels across a trailing window (default: 50 bars). Computes a proximity tolerance buffer defined in points (default: 80 points).
- Buy Condition: The low boundary of the signal candle penetrates or touches the lowest low support zone (Low <= Support + Zone AND Low >= Support - Zone, or penetrates and closes back).
- Sell Condition: The high boundary of the signal candle penetrates or touches the highest high resistance zone (High >= Resistance - Zone AND High <= Resistance + Zone, or penetrates and closes back).
- Purpose: Ensures signals originate at structural market extremities rather than in random price areas.
15. Dynamic Fibonacci Retracement Golden Pocket Filter
- Logic: Scans backward using configurable ZigZag parameters (Depth 12, Deviation 5, Backstep 3) to identify the two most recent verified swing points (Swing High and Swing Low). It constructs dynamic Fibonacci retracement coordinates across the measured range.
- Buy and Sell Condition: The signal candle range (High to Low) must actively intersect the designated Fibonacci retracement band defined between Level 1 (default: 0.382) and Level 2 (default: 0.618).
- Purpose: Aligns engulfing price action directly with institutional harmonic retracement and equilibrium value areas.
16. Heiken Ashi Trend Confirmation Filter
- Logic: Computes real-time synthetic Heiken Ashi candlesticks using standard weighted formulas: HA_Close = (Open + High + Low + Close) / 4; HA_Open = (HA_Open[prior] + HA_Close[prior]) / 2.
- Buy Condition: The synthetic Heiken Ashi candle is bullish (HA_Close > HA_Open).
- Sell Condition: The synthetic Heiken Ashi candle is bearish (HA_Close < HA_Open).
- Purpose: Eliminates noisy micro-ticks and ensures directional consistency through synthetic smoothing.
### Complete Documentation of Input Parameters
Below is the exhaustive technical specification of every input parameter declared in the indicator source code, categorized by functional group:
Signal Control
- InpEnableRetail (Default: true) -> Boolean toggle to activate or deactivate calculations and signal generation for standard Retail Engulfing patterns.
- InpEnableInstitutional (Default: true) -> Boolean toggle to activate or deactivate calculations and signal generation for advanced Institutional Outside Engulfing patterns.
Signal Appearance
- InpSignalOffset (Default: 30) -> Vertical plot offset in points measured from the high or low of the candle for arrow marker placement. Institutional signals automatically incorporate an additional 30-point offset for clear visual hierarchy.
- InpArrowCodeBuy (Default: 233) -> Wingdings character code used to render bullish directional arrows on the chart.
- InpArrowCodeSell (Default: 234) -> Wingdings character code used to render bearish directional arrows on the chart.
Retail Settings (Standard)
- InpRetailRequireTrend (Default: true) -> Boolean switch requiring preceding directional candle persistence before validating a retail engulfing pattern.
- InpRetailTrendBars (Default: 2) -> Integer count specifying the exact number of consecutive opposing color candles required immediately prior to the engulfing candle.
Institutional Settings (Advanced)
- InpBodyMultiplier (Default: 1.5) -> Floating-point ratio dictating that the absolute body size of the signal bar must be at least X times larger than the preceding bar body.
- InpRequireHigherVolume (Default: true) -> Boolean verification ensuring that the signal bar volume (tick or real exchange) strictly exceeds the preceding bar volume.
- InpMinClosePosition (Default: 0.70) -> Decimal ratio defining the minimum closing placement within the total bar range. For Buy signals, (Close - Low) / Range must be >= 0.70. For Sell signals, (High - Close) / Range must be >= 0.70.
- InpRequireFullOutside (Default: true) -> Boolean toggle requiring the signal candle high to exceed the prior high and signal candle low to undercut the prior low.
- InpInstRequireTrend (Default: true) -> Boolean switch requiring preceding directional candle persistence for institutional setups.
- InpInstTrendBars (Default: 3) -> Integer count establishing the number of consecutive opposing color candles required prior to an institutional engulfing setup.
Filter Mode
- Mode_Group (Default: "=== FILTER MODE ===") -> Section header string separating pattern logic from confirmation filters in the Inputs interface.
RSI Cross Filter
- Use_RSI_Cross_Filter (Default: false) -> Boolean switch to activate or deactivate RSI boundary cross confirmation logic.
- RSI_Length (Default: 14) -> Calculation period used to compute standard RSI momentum values.
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied price constant used in RSI mathematical calculations.
- Oversold (Default: 30.0) -> Lower boundary threshold for RSI bullish upward penetration checks.
- Overbought (Default: 70.0) -> Upper boundary threshold for RSI bearish downward penetration checks.
ADX Filter
- Use_ADX_Filter (Default: false) -> Boolean switch to activate or deactivate the Average Directional Index trend strength gate.
- ADX_Period (Default: 10) -> Lookback smoothing window for directional movement calculation.
- ADX_Min_Level (Default: 20.0) -> Absolute minimum threshold that the main ADX line must maintain to validate setups.
Single MA Filter
- Use_MA_Filter (Default: false) -> Boolean switch to activate or deactivate baseline single moving average trend validation.
- MA_Period (Default: 50) -> Calculation averaging period applied to the single moving average line.
- MA_Method (Default: MODE_SMA) -> Mathematical smoothing method (SMA, EMA, SMMA, or LWMA).
- MA_Shift (Default: 0) -> Horizontal bar offset displacement applied to the moving average buffer.
Ichimoku Senkou Span B Filter
- Use_Ichimoku_Filter (Default: false) -> Boolean switch to activate or deactivate the Ichimoku Senkou Span B equilibrium barrier.
- Ichimoku_SenkouB (Default: 52) -> Averaging period applied to calculate the Senkou Span B boundary line ((Highest High + Lowest Low) / 2).
- Ichimoku_Kijun (Default: 26) -> Forward displacement shift applied to the equilibrium buffer projection.
RSI 75 Filter
- Use_RSI75_Filter (Default: false) -> Boolean switch to activate or deactivate the long-term 75-period RSI momentum midline filter.
- RSI_Filter_Period (Default: 75) -> Lookback calculation window applied to the macro momentum RSI oscillator.
Double MA Filter
- Use_DoubleMA_Filter (Default: false) -> Boolean switch to activate or deactivate dual moving average directional alignment.
- MA_A_Period (Default: 30) -> Lookback averaging window applied to the fast moving average line.
- MA_A_Method (Default: MODE_EMA) -> Smoothing calculation method applied to the fast moving average.
- MA_A_Applied (Default: PRICE_CLOSE) -> Price series type applied to calculate the fast moving average.
- MA_A_Shift (Default: 0) -> Horizontal bar shift applied to the fast moving average.
- MA_B_Period (Default: 140) -> Lookback averaging window applied to the slow moving average line.
- MA_B_Method (Default: MODE_EMA) -> Smoothing calculation method applied to the slow moving average.
- MA_B_Applied (Default: PRICE_CLOSE) -> Price series type applied to calculate the slow moving average.
- MA_B_Shift (Default: 0) -> Horizontal bar shift applied to the slow moving average.
Awesome Oscillator Filter
- Use_AO_Filter (Default: false) -> Primary boolean switch to activate Awesome Oscillator confirmation routines.
- Use_AO_Volume_Filter (Default: false) -> Enables magnitude thresholds on the Awesome Oscillator value.
- AO_Buy_Min (Default: 4.0) -> Minimum positive oscillator magnitude required to validate bullish signals.
- AO_Sell_Max (Default: -4.0) -> Maximum negative oscillator magnitude required to validate bearish signals.
- Use_AO_Color_Filter (Default: false) -> Enables slope/color checks requiring expanding histogram direction.
- Use_AO_Zero_Filter (Default: false) -> Enables zero-line orientation checks requiring positive expansion for Buy and negative expansion for Sell.
Parabolic SAR Filter
- Use_SAR_Filter (Default: false) -> Activates Parabolic Stop and Reverse trajectory confirmation.
- SAR_Step (Default: 0.02) -> Acceleration factor incremental step size for SAR calculation.
- SAR_Maximum (Default: 0.2) -> Maximum terminal ceiling cap for the SAR acceleration factor.
Heiken Ashi Filter
- Use_HeikenAshi_Filter (Default: false) -> Activates synthetic smoothed Heiken Ashi candle color confirmation.
CCI Trend Filter
- Use_CCI_Filter (Default: false) -> Activates 50-period Commodity Channel Index zero-line trend alignment.
- CCI_Period (Default: 50) -> Calculation averaging period applied to the broad CCI trend indicator.
- CCI_Applied (Default: PRICE_CLOSE) -> Price series parameter applied to compute the broad CCI line.
CCI Overbought & Oversold Filter
- Use_CCI_OBOS_Filter (Default: false) -> Activates 14-period statistical extreme momentum breakout confirmation.
- CCI_OBOS_Period (Default: 14) -> Lookback smoothing window for the fast CCI momentum oscillator.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Price series used in the fast CCI mathematical calculation.
- CCI_Overbought (Default: 100.0) -> Statistical upper positive extreme boundary.
- CCI_Oversold (Default: -100.0) -> Statistical lower negative extreme boundary.
RVI Trend Filter
- Use_RVI_Filter (Default: false) -> Activates long-term 75-period Relative Vigor Index zero-line orientation.
- RVI_Period (Default: 75) -> Lookback period used to compute broad directional energy vigor.
RVI Signal Filter
- Use_RVI_Signal_Filter (Default: false) -> Activates Relative Vigor Index dynamic main-versus-signal cross checks.
- RVI_Signal_Period (Default: 20) -> Lookback period used to compute the dynamic RVI signal cross pair.
MACD Signal Filter
- Use_MACD_Filter (Default: false) -> Activates MACD histogram polarity validation (Main minus Signal line).
- MACD_FastEMA (Default: 12) -> Fast exponential moving average period in the MACD calculation.
- MACD_SlowEMA (Default: 26) -> Slow exponential moving average period in the MACD calculation.
- MACD_SignalSMA (Default: 9) -> Signal simple moving average smoothing period applied to MACD differences.
- MACD_Applied (Default: PRICE_CLOSE) -> Price series applied across all MACD exponential components.
MACD Zero Filter
- Use_MACD_Zero_Filter (Default: false) -> Activates MACD main line zero-level polarity confirmation.
Support & Resistance Filter
- Use_SR_Filter (Default: false) -> Activates trailing extreme boundary support and resistance level proximity checks.
- SR_Period (Default: 50) -> Trailing historical bar lookback window scanned to determine extreme high and low points.
- SR_Zone_Points (Default: 80.0) -> Tolerance band distance specified in points surrounding the calculated support and resistance levels.
Fibonacci Filter
- Use_Fib_Filter (Default: false) -> Activates dynamic ZigZag swing detection and Fibonacci golden pocket confluence.
- Fib_Level_1 (Default: 0.382) -> Lower fractional retracement ratio establishing the boundary of the golden zone.
- Fib_Level_2 (Default: 0.618) -> Upper fractional retracement ratio establishing the boundary of the golden zone.
- ZigZag_Depth (Default: 12) -> Minimum bar count threshold applied to establish swing high and swing low extremities.
- ZigZag_Deviation (Default: 5) -> Minimum point change threshold required to confirm new swing points.
- ZigZag_Backstep (Default: 3) -> Minimum number of bars intervening between consecutive local peaks and troughs.
Alert Notifications
- InpEnableAlerts (Default: true) -> Enables native on-screen pop-up alert dialog boxes inside MetaTrader 5.
- InpEnablePush (Default: false) -> Enables real-time mobile push notifications sent via MetaQuotes ID.
- InpEnableEmail (Default: false) -> Enables automated email dispatch via the terminal SMTP communication layer.
- InpEnableSound (Default: true) -> Enables audible WAV audio sound playback upon confirmed signal generation.
- InpSoundBuy (Default: "alert.wav") -> Audio file string reference located inside the terminal Sounds directory triggered on Buy signals.
- InpSoundSell (Default: "alert2.wav") -> Audio file string reference located inside the terminal Sounds directory triggered on Sell signals.
Risk Disclaimer
Trading foreign exchange, indices, commodities, cryptocurrencies, and other financial instruments carries a substantial level of risk to your capital and may not be suitable for all investors. High leverage can work against you as well as for you. Past performance, backtested results, and simulated historical setups do not guarantee future returns. This software is an analytical and operational technical analysis indicator designed to assist traders in objective pattern recognition; it does not provide financial investment advice or constitute an automated wealth-generating system. Users must exercise independent risk management, evaluate proper position sizing, and thoroughly test the indicator on a risk-free demo account before deploying it in live trading environments.
