Bollinger Band Breakout MultiFilter PRO Signal MT5
- Indicateurs
- Version: 1.42
- Activations: 5
1. Overview and Operational Purpose
Bollinger Band Signal MultiFilter MT5 is an analytical technical indicator developed for the MetaTrader 5 terminal, designed to detect volatility expansion breakouts while filtering market noise through an extensive modular array of quantitative secondary filters. In dynamic market environments, classic envelope breakouts frequently encounter false continuations during low-momentum ranges or trend exhaustion phases. This indicator resolves that operational challenge by enforcing a strict candle-piercing breakout requirement and subjecting each prospective signal to user-selected technical filters before plotting chart markers and transmitting execution alerts.
The primary objective of the software is to provide systematic traders with an objective, rule-based execution and scanning tool. Rather than locking users into a rigid black-box strategy, the system provides sixteen independent confirmation modules, covering momentum oscillators, directional baseline moving averages, dynamic support and resistance channels, and algorithmic Fibonacci swing projections. The program executes natively within MetaTrader 5 using optimized indicator handles, ensuring swift calculation times, low memory overhead, and straightforward compatibility with automated Expert Advisors via custom indicator buffers.
2. Operating Principle and Signal Generation Logic
The calculation engine operates via a two-tier verification structure: primary Bollinger Band boundary piercing followed by multi-filter confirmation logic.
Primary Bollinger Bands Breakout Logic:
The base engine calculates standard Bollinger Bands envelopes based on user-defined period, deviation multiplier, and applied price parameters:
- Middle Band: Simple Moving Average (SMA) of the designated price source across the calculation period.
- Upper Band: Middle Band + (Standard Deviation * Deviation Multiplier).
- Lower Band: Middle Band - (Standard Deviation * Deviation Multiplier).
A primary trigger requires specific candle geometry relative to the volatility bands:
- Bullish Signal Condition: The current candle must be a bullish bar where the closing price exceeds the opening price (Close[i] > Open[i]), the closing price closes strictly above the Upper Band (Close[i] > UpperBuffer[i]), and the candle low price remains at or below the Upper Band (Low[i] <= UpperBuffer[i]). This ensures the candle body actively penetrated and closed beyond the upper envelope during the formation period.
- Bearish Signal Condition: The current candle must be a bearish bar where the closing price is below the opening price (Close[i] < Open[i]), the closing price closes strictly below the Lower Band (Close[i] < LowerBuffer[i]), and the candle high price remains at or above the Lower Band (High[i] >= LowerBuffer[i]). This ensures the candle body actively penetrated and closed beyond the lower envelope during the formation period.
Repaint Behavior and Calculation Characteristics:
- Historical Calculation: On closed historical bars (bar index 1 and older), all calculations, buffer arrays, and signal arrows are locked and non-repainting. Once a candle completes its duration and closes, signal arrows remain fixed in their respective buffers and will not shift, disappear, or recalculate.
- Real-Time Processing: On the live active bar (bar index 0 / rates_total - 1), calculations refresh on incoming price ticks to reflect real-time price evolution. To prevent multiple alerts during active bar formation, the internal notification system logs candle open timestamps (last_buy_alert and last_sell_alert) and broadcasts notifications once per qualifying candle horizon.
3. Detailed Technical Specification of the 16 Filter Engines
Each filter module operates independently and can be toggled via input parameters. When enabled, a filter applies a mandatory boolean validation check that must evaluate to true concurrently with the primary breakout:
- RSI Cross Filter: Evaluates momentum boundary re-entry using the Relative Strength Index. For a BUY signal, current RSI must cross above the oversold boundary while having traded below or equal to it on the previous bar (RSI[i] > Oversold and RSI[i-1] <= Oversold). For a SELL signal, current RSI must cross below the overbought threshold from above (RSI[i] < Overbought and RSI[i-1] >= Overbought). This identifies directional impulse emerging directly from boundary zones.
- ADX Trend Strength Filter: Employs the Average Directional Index to quantify directional momentum. Both BUY and SELL signals require the ADX line to equal or exceed the minimum threshold (ADX[i] >= ADX_Min_Level). When the market enters low-volatility consolidation below this threshold, all breakout triggers are suppressed.
- Single Moving Average Filter: Enforces baseline trend direction. Bullish breakouts are validated only when the closing price trades above the moving average line (Close[i] > MA[i]). Bearish breakdowns require the closing price to trade below the moving average line (Close[i] < MA[i]).
- Ichimoku Senkou Span B Filter: Utilizes the equilibrium boundary of the Ichimoku Kinko Hyo system. The algorithm extracts the historical Senkou Span B buffer with a defined forward projection shift (default 26 bars), evaluating the active cloud boundary at the current bar index (SenkouB[i - Shift]). A BUY signal requires price to trade strictly above the active Span B level, while a SELL signal requires price to trade strictly below it.
- RSI 75 Filter: Employs an extended period (default 75) Relative Strength Index as a macro trend regime discriminator. BUY signals are confirmed only when the macro RSI maintains a position above the 50.0 equilibrium level (RSI75[i] > 50.0). SELL signals require the macro RSI to trade below the 50.0 level (RSI75[i] < 50.0).
- Double Moving Average Filter: Uses a dual moving average arrangement (Fast MA and Slow MA) to confirm established trend alignment. A BUY trigger requires the faster moving average to trade above the slower moving average (MA_A[i] > MA_B[i]). Conversely, a SELL trigger requires the faster moving average to trade below the slower moving average (MA_A[i] < MA_B[i]).
- Awesome Oscillator (AO) Filter: Features three distinct, selectable momentum validation modes calculated from the median price difference:
1. AO Volume Threshold: Enforces minimum momentum magnitude. BUY requires AO[i] >= AO_Buy_Min; SELL requires AO[i] <= AO_Sell_Max.
2. AO Color Slope: Enforces directional acceleration. BUY requires current AO to exceed previous AO (AO[i] > AO[i-1]); SELL requires current AO to be below previous AO (AO[i] < AO[i-1]).
3. AO Zero-Line Confirmation: Enforces directional alignment with positive or negative momentum. BUY requires AO to be rising above zero (AO[i] > AO[i-1] and AO[i] > 0); SELL requires AO to be falling below zero (AO[i] < AO[i-1] and AO[i] < 0).
- Parabolic SAR Filter: Integrates the trailing directional parabolic stop-and-reverse system. Bullish breakouts require the closing price to be located above the current Parabolic SAR point (Close[i] > SAR[i]). Bearish breakdowns require the closing price to be located below the SAR point (Close[i] < SAR[i]).
- Heiken Ashi Trend Filter: Calculates synthetic Heiken Ashi candles internally to smooth out intra-bar noise. A BUY signal requires a bullish Heiken Ashi candle body (HA_Close[i] > HA_Open[i]). A SELL signal requires a bearish Heiken Ashi candle body (HA_Close[i] < HA_Open[i]).
- CCI Trend Filter: Uses the Commodity Channel Index as a zero-line directional baseline. A BUY signal is valid only when the CCI trades above zero (CCI[i] > 0.0), indicating positive price distribution relative to statistical mean. A SELL signal requires CCI to trade below zero (CCI[i] < 0.0).
- CCI Overbought & Oversold Filter: Leverages extreme statistical deviations to confirm breakout velocity. A BUY signal requires CCI to actively penetrate into or above the overbought boundary (CCI_OBOS[i] > CCI_Overbought, default +100). A SELL signal requires CCI to penetrate into or below the oversold boundary (CCI_OBOS[i] < CCI_Oversold, default -100).
- RVI Trend Filter: Utilizes the Relative Vigor Index to assess whether prices close higher or lower relative to their intra-bar ranges. A BUY trigger requires RVI to maintain a reading above zero (RVI[i] > 0.0). A SELL trigger requires RVI to maintain a reading below zero (RVI[i] < 0.0).
- RVI Signal Line Filter: Compares the main RVI calculation with its smoothed 4-period symmetric weighted signal line. A BUY signal requires the main RVI line to trade above the signal line (RVI_Main[i] > RVI_Sig[i]). A SELL signal requires the main RVI line to trade below the signal line (RVI_Main[i] < RVI_Sig[i]).
- MACD Signal Filter: Evaluates the relationship between the MACD main line and the MACD signal line (histogram differential). A BUY signal requires the histogram to be positive (MACD_Main[i] - MACD_Signal[i] > 0.0). A SELL signal requires the histogram to be negative (MACD_Main[i] - MACD_Signal[i] < 0.0).
- MACD Level 0 Filter: Employs the MACD main line relative to the absolute zero center line. A BUY signal requires the MACD main line to trade above zero (MACD_Main[i] > 0.0). A SELL signal requires the MACD main line to trade below zero (MACD_Main[i] < 0.0).
- Support & Resistance Filter: Scans past price bars over a user-defined lookback period (SR_Period) to determine the absolute high resistance and absolute low support boundaries. The engine establishes a dynamic price buffer around each level (SR_Zone_Points * Point). A BUY signal requires price action to interact with or bounce from the designated support zone. A SELL signal requires price action to interact with or test the designated resistance zone.
- Fibonacci Retracement Filter: Integrates an algorithmic swing recognition function (GetLastSwingPoints) that scans historical bars using ZigZag depth, deviation, and backstep rules. Upon identifying the most recent swing high and swing low, the algorithm calculates key Fibonacci retracement levels (default 38.2% and 61.8%). A signal is validated only if the candle range intersects the calculated Fibonacci confluence zone.
4. Complete Input Parameters Documentation
Every parameter declared within the indicator script is documented below with its default value, data type, and functional definition:
Bollinger Bands Settings:
- InpPeriod (Default: 20, Type: int): Lookback period used to calculate the Bollinger Bands moving average baseline.
- InpDeviation (Default: 0.5, Type: double): Standard deviation multiplier determining the width of the upper and lower bands.
- InpPrice (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price data used in Bollinger Band calculations.
- InpBandColor (Default: clrRed, Type: color): Chart display color for the Upper, Middle, and Lower band lines.
Signal & Arrow Display Settings:
- InpBuyColor (Default: clrAqua, Type: color): Color of bullish BUY signal arrow markers drawn on the chart.
- InpSellColor (Default: clrRed, Type: color): Color of bearish SELL signal arrow markers drawn on the chart.
- InpArrowShift (Default: 30, Type: int): Vertical distance in points between arrow markers and candle High/Low prices.
Alerts & Notification Settings:
- InpAlert (Default: true, Type: bool): Enables on-screen pop-up alert dialog boxes inside MetaTrader 5.
- InpSound (Default: true, Type: bool): Enables audible sound playback upon confirmed signal generation.
- InpPush (Default: false, Type: bool): Enables push notifications sent to mobile terminals via MetaQuotes ID.
- InpPrintLog (Default: true, Type: bool): Writes detailed signal information into the terminal Experts log tab.
- InpBuySound (Default: "ok.wav", Type: string): Filename of the audio file played for BUY signals (located in terminal Sounds folder).
- InpSellSound (Default: "timeout.wav", Type: string): Filename of the audio file played for SELL signals (located in terminal Sounds folder).
RSI Cross Filter Settings:
- Use_RSI_Cross_Filter (Default: false, Type: bool): Toggles the RSI boundary crossover confirmation filter.
- RSI_Length (Default: 14, Type: int): Averaging period for the Relative Strength Index.
- RSI_Price_Source (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for RSI computation.
- Oversold (Default: 30.0, Type: double): Lower boundary threshold required for bullish crossover validation.
- Overbought (Default: 70.0, Type: double): Upper boundary threshold required for bearish crossover validation.
ADX Filter Settings:
- Use_ADX_Filter (Default: false, Type: bool): Toggles the Average Directional Index trend strength filter.
- ADX_Period (Default: 10, Type: int): Calculation period for the ADX indicator engine.
- ADX_Min_Level (Default: 20.0, Type: double): Minimum directional index value required to validate any breakout signal.
Single Moving Average Filter Settings:
- Use_MA_Filter (Default: false, Type: bool): Toggles the baseline moving average trend direction filter.
- MA_Period (Default: 50, Type: int): Averaging lookback period for the moving average.
- MA_Method (Default: MODE_SMA, Type: ENUM_MA_METHOD): Moving average smoothing method (SMA, EMA, SMMA, LWMA).
- MA_Shift (Default: 0, Type: int): Horizontal bar shift applied to the moving average series.
Ichimoku Senkou Span B Filter Settings:
- Use_Ichimoku_Filter (Default: false, Type: bool): Toggles the Ichimoku Senkou Span B cloud boundary filter.
- Ichimoku_SenkouB (Default: 52, Type: int): Lookback period used to calculate the Senkou Span B baseline.
- Ichimoku_Shift (Default: 26, Type: int): Horizontal shift parameter aligning Span B with the active bar.
RSI 75 Filter Settings:
- Use_RSI75_Filter (Default: false, Type: bool): Toggles the long-period macro cycle RSI filter.
- RSI_Filter_Period (Default: 75, Type: int): Calculation lookback period for macro RSI evaluation.
Double Moving Average Filter Settings:
- Use_DoubleMA_Filter (Default: false, Type: bool): Toggles dual moving average trend alignment filtering.
- MA_A_Period (Default: 30, Type: int): Calculation period for faster moving average line A.
- MA_A_Method (Default: MODE_EMA, Type: ENUM_MA_METHOD): Smoothing calculation method for moving average A.
- MA_A_Applied (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for moving average A.
- MA_A_Shift (Default: 0, Type: int): Horizontal bar offset for moving average A.
- MA_B_Period (Default: 140, Type: int): Calculation period for slower moving average line B.
- MA_B_Method (Default: MODE_EMA, Type: ENUM_MA_METHOD): Smoothing calculation method for moving average B.
- MA_B_Applied (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for moving average B.
- MA_B_Shift (Default: 0, Type: int): Horizontal bar offset for moving average B.
Awesome Oscillator (AO) Settings:
- Use_AO_Filter (Default: false, Type: bool): Master toggle for Awesome Oscillator momentum validation.
- Use_AO_Volume_Filter (Default: false, Type: bool): Activates minimum momentum magnitude threshold validation.
- AO_Buy_Min (Default: 4.0, Type: double): Minimum oscillator value required to confirm a BUY signal.
- AO_Sell_Max (Default: -4.0, Type: double): Maximum negative oscillator value required to confirm a SELL signal.
- Use_AO_Color_Filter (Default: false, Type: bool): Enforces momentum bar slope direction (rising for BUY, falling for SELL).
- Use_AO_Zero_Filter (Default: false, Type: bool): Enforces oscillator positioning relative to zero combined with bar slope.
Parabolic SAR Settings:
- Use_SAR_Filter (Default: false, Type: bool): Toggles the Parabolic SAR trailing trend filter.
- SAR_Step (Default: 0.02, Type: double): Acceleration factor step increment.
- SAR_Maximum (Default: 0.2, Type: double): Maximum allowable acceleration factor cap.
Heiken Ashi Settings:
- Use_HeikenAshi_Filter (Default: false, Type: bool): Toggles the internal synthetic Heiken Ashi bar filter.
CCI Trend Settings:
- Use_CCI_Filter (Default: false, Type: bool): Toggles the standard zero-line CCI directional filter.
- CCI_Period (Default: 50, Type: int): Calculation lookback period for trend CCI.
- CCI_Applied (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for trend CCI.
CCI Overbought & Oversold Settings:
- Use_CCI_OBOS_Filter (Default: false, Type: bool): Toggles extreme momentum boundary CCI filtering.
- CCI_OBOS_Period (Default: 14, Type: int): Calculation lookback period for momentum CCI.
- CCI_OBOS_Applied (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for momentum CCI.
- CCI_Overbought (Default: 100.0, Type: double): Upper threshold boundary required for BUY confirmation.
- CCI_Oversold (Default: -100.0, Type: double): Lower threshold boundary required for SELL confirmation.
RVI Trend Settings:
- Use_RVI_Filter (Default: false, Type: bool): Toggles zero-line Relative Vigor Index trend filtering.
- RVI_Period (Default: 75, Type: int): Calculation lookback period for trend RVI.
RVI Signal Settings:
- Use_RVI_Signal_Filter (Default: false, Type: bool): Toggles RVI main vs signal line crossover filtering.
- RVI_Signal_Period (Default: 20, Type: int): Calculation lookback period for signal line RVI.
MACD Signal & Zero Settings:
- Use_MACD_Filter (Default: false, Type: bool): Toggles MACD histogram directional filtering.
- MACD_FastEMA (Default: 12, Type: int): Averaging period for fast exponential moving average.
- MACD_SlowEMA (Default: 26, Type: int): Averaging period for slow exponential moving average.
- MACD_SignalSMA (Default: 9, Type: int): Averaging period for MACD signal line.
- MACD_Applied (Default: PRICE_CLOSE, Type: ENUM_APPLIED_PRICE): Applied price source for MACD computation.
- Use_MACD_Zero_Filter (Default: false, Type: bool): Toggles MACD baseline zero-level filtering.
Support & Resistance Settings:
- Use_SR_Filter (Default: false, Type: bool): Toggles dynamic support and resistance zone filtering.
- SR_Period (Default: 50, Type: int): Historical lookback window used to identify extreme price highs and lows.
- SR_Zone_Points (Default: 80, Type: double): Proximity boundary thickness in points surrounding identified levels.
Fibonacci Confluence Settings:
- Use_Fib_Filter (Default: false, Type: bool): Toggles dynamic ZigZag swing Fibonacci retracement filtering.
- Fib_Level_1 (Default: 0.382, Type: double): Primary Fibonacci ratio determining outer confluence boundary.
- Fib_Level_2 (Default: 0.618, Type: double): Secondary Fibonacci ratio determining inner confluence boundary.
- ZigZag_Depth (Default: 12, Type: int): Minimum bar lookback parameter for swing point identification.
- ZigZag_Deviation (Default: 5, Type: int): Minimum price deviation in points required to register a swing vertex.
- ZigZag_Backstep (Default: 3, Type: int): Minimum bar separation required between consecutive swing vertices.
5. Strategic Configurations and Analytical Presets
To assist traders in configuring the indicator across varying market regimes, four structured setup profiles are outlined below:
Configuration 1: Volatility Breakout with Trend Momentum Confirmation
- Intended Market Profile: Trending instruments experiencing contraction-to-expansion transitions.
- Recommended Setup: Bollinger Bands (Period: 20, Dev: 0.5 or 1.0), Single MA Filter (Period: 50, Method: EMA), ADX Filter (Period: 14, Min Level: 22.0).
- Operational Logic: Breakout signals beyond the bands are permitted only when the market trades on the correct side of the 50 EMA and ADX confirms sufficient trend strength, filtering out non-directional consolidation phases.
Configuration 2: Structural Key-Level Price Action Breakout
- Intended Market Profile: Rejection and continuation setups occurring around major historical inflection zones.
- Recommended Setup: Bollinger Bands (Period: 20, Dev: 0.5), Support & Resistance Filter (Period: 50, Zone: 100 points), Fibonacci Filter (Depth: 12, Dev: 5, Backstep: 3, Levels: 0.382 and 0.618).
- Operational Logic: Requires the breakout candle to interact with identified horizontal support/resistance levels or key Fibonacci golden ratio zones, ensuring technical confluence prior to signal generation.
Configuration 3: Multi-Oscillator Momentum Surge
- Intended Market Profile: Aggressive intra-day breakout trading during high-liquidity market sessions.
- Recommended Setup: Bollinger Bands (Period: 20, Dev: 0.5), MACD Signal Filter (Default 12, 26, 9), Awesome Oscillator Filter (Color Filter: true, Zero Filter: true), Heiken Ashi Filter: true.
- Operational Logic: Demands simultaneous agreement across MACD histogram expansion, Awesome Oscillator acceleration, and synthetic Heiken Ashi directional coloring to validate the volatility breakout.
Configuration 4: Macro Trend and Equilibrium Alignment
- Intended Market Profile: Higher-timeframe swing trading focused on multi-layered institutional baselines.
- Recommended Setup: Bollinger Bands (Period: 20, Dev: 0.5), Ichimoku Senkou Span B Filter (Span B: 52, Shift: 26), RSI 75 Filter (Period: 75), Parabolic SAR Filter (Step: 0.02, Max: 0.2).
- Operational Logic: Signals require market price to trade above the active Ichimoku cloud baseline, long-period RSI to maintain a position above 50, and Parabolic SAR to align underneath price for bullish breakout confirmation.
6. Technical Specifications, Buffer Architecture and Compatibility
- Platform Compatibility: Native MetaTrader 5 (MT5).
- Applicable Instruments: Forex Currency Pairs, Precious Metals (XAUUSD, XAGUSD), Crude Oil, Equity Indices, and Liquid Cryptocurrencies.
- Supported Timeframes: Operates across all standard MT5 timeframes (M1, M5, M15, M30, H1, H4, D1). Lower timeframes (M1-M15) are commonly utilized for intra-day scanning, while higher timeframes (H1-D1) provide macro confluence.
- Account Types: Fully functional on both Hedging and Netting account modes across Standard, ECN, and Raw Spread execution environments.
Buffer Allocation for Expert Advisor (EA) Integration:
Developers can interface with the indicator via standard MQL5 iCustom function calls. The indicator exposes five data buffers:
- Buffer Index 0: Upper Bollinger Band line series (double).
- Buffer Index 1: Middle Bollinger Band line series (double).
- Buffer Index 2: Lower Bollinger Band line series (double).
- Buffer Index 3: Bullish BUY Signal Arrow (double; contains price value on signal candle, EMPTY_VALUE otherwise).
- Buffer Index 4: Bearish SELL Signal Arrow (double; contains price value on signal candle, EMPTY_VALUE otherwise).
Computational Efficiency and Resource Management:
The indicator is engineered using event-driven OnCalculate routines with prev_calculated bar indexing. Historical bars are computed once during initialization, while subsequent incoming ticks only update the active bar sequence. This architecture maintains minimal terminal CPU and memory footprints even when all sixteen filters are activated concurrently.
7. Alerting, Notifications and Sound Diagnostics
The indicator incorporates an integrated multi-channel alerting framework:
- Terminal Pop-Up Alert: Generates a modal dialog box containing the asset symbol, timeframe, direction, and filter confirmation status.
- Sound Notification: Plays distinct audio alerts (ok.wav for BUY, timeout.wav for SELL) directly through the operating system audio interface. Audio files must reside in the standard Terminal_Data_Folder/Sounds/ directory.
- Mobile Push Notification: Dispatches real-time notifications to the trader's mobile MetaTrader 5 terminal on iOS or Android. Requires configuration of the trader's personal MetaQuotes ID under Tools -> Options -> Notifications.
- Terminal Journal Logging: Records timestamped execution logs in the Experts tab for audit trails and strategy diagnostics.
8. Installation and Operational Setup Guide
1. Launch the MetaTrader 5 terminal and open the data folder via File -> Open Data Folder.
2. Navigate to MQL5/Indicators/ and place the compiled indicator file into this directory.
3. Restart MetaTrader 5 or right-click the Indicators tree in the Navigator window and select Refresh.
4. Drag the indicator from the Navigator window onto your desired asset chart.
5. In the configuration window, adjust your preferred Bollinger Bands settings, enable required filter modules, and verify your notification choices.
6. Verify that 'Allow DLL imports' remains at default settings as this software relies strictly on native MQL5 algorithms and requires no external libraries.
7. Save your preferred configuration as a .set file within the Inputs tab for fast deployment across multiple charts.
9. Formal Risk Disclosure and Terms of Use
Trading foreign exchange, commodities, indices, and financial derivatives carries a substantial degree of risk and may not be suitable for all categories of investors. Leverage can magnify potential losses as well as gains. Past technical analysis performance and historical chart illustrations do not constitute a guarantee of future operational performance.
This software is an analytical and operational indicator engineered solely to assist traders with quantitative price evaluation and structured technical analysis; it does not provide automated financial recommendations or guarantee profitable outcomes. Users are strongly advised to evaluate the indicator thoroughly on a demo account in a simulated trading environment to understand its behavior, parameter sensitivities, and filter interactions before considering deployment in live market conditions.
