MACD Zero Cross Pro Level 0 Signals Multi Filters
- Göstergeler
- Sürüm: 1.45
- Güncellendi: 26 Ekim 2026
- Etkinleştirmeler: 5
Overview
MACD Signal with Multi Filters is an advanced technical analysis indicator engineered for MetaTrader 5 (MT5). The software combines the classic Moving Average Convergence Divergence (MACD) oscillator architecture with a modular 14-filter confirmation engine (MultiFilterSuite). It is developed to assist manual traders, quantitative analysts, and algorithmic system developers in identifying momentum shifts, trend continuations, and structural turning points while filtering out sideways market noise and false breakouts.
The indicator plots a four-color dynamic momentum histogram alongside the standard MACD line and Signal line in a separate indicator window. It renders visual directional signal arrows directly on the main chart whenever the primary momentum crossover satisfies user-selected secondary filter criteria. To ensure timely execution in manual trading environments, the system features a multi-channel notification engine supporting native client terminal pop-ups, custom audio alerts, push notifications to MetaTrader mobile terminals (iOS and Android), and automated email notifications.
Operating Principle and Technical Logic
1. Core MACD Architecture and Mathematical Formulation
The foundational engine calculates classic oscillator metrics using exponential and simple moving averages of applied prices across consecutive bars:
- Fast Exponential Moving Average (Fast EMA): Calculated across a short lookback period (default 12 bars) to track recent price velocity.
- Slow Exponential Moving Average (Slow EMA): Calculated across a longer lookback period (default 26 bars) to establish baseline trend trajectory.
- MACD Line: The primary differential series derived by subtracting Slow EMA from Fast EMA: MACD Line = Fast EMA - Slow EMA.
- Signal Line: A simple moving average (SMA) calculated across the MACD Line over the signal period (default 9 bars): Signal Line = SMA(MACD Line, SignalSMA).
- Momentum Histogram: Calculated as the arithmetic spread between the MACD Line and the Signal Line: Histogram = MACD Line - Signal Line.
2. Dynamic Four-Color Histogram Classification
To provide immediate visual clarity on acceleration and deceleration of momentum, the histogram buffer uses four distinct color classifications based on bar-to-bar delta evaluation:
- Lime Green: Value is above zero (Histogram >= 0) and expanding upward (Histogram[i] > Histogram[i - 1]), indicating growing bullish momentum.
- Dark Green: Value is above zero (Histogram >= 0) but contracting downward (Histogram[i] <= Histogram[i - 1]), indicating waning bullish momentum or consolidation.
- Red: Value is below zero (Histogram < 0) and expanding downward (Histogram[i] < Histogram[i - 1]), indicating growing bearish momentum.
- Maroon: Value is below zero (Histogram < 0) but contracting upward (Histogram[i] >= Histogram[i - 1]), indicating waning bearish momentum or absorption.
3. Selectable Primary Entry Methods (EntryMethod)
Traders can select three distinct primary trigger mechanisms via the EntryMethod input dropdown:
- Mode 0 (ENTRY_MACD_CROSS_SIGNAL): Triggered when the MACD Line crosses above the Signal Line for a Buy signal, or crosses below the Signal Line for a Sell signal. This mode offers maximum sensitivity to momentum shifts.
- Mode 1 (ENTRY_MACD_CROSS_ZERO): Triggered when the MACD Line crosses above the neutral zero level (0.0) from negative territory for a Buy signal, or crosses below zero from positive territory for a Sell signal. This mode acts as a medium-term trend confirmation filter.
- Mode 2 (ENTRY_MACD_CROSS_SIGNAL_ZERO): A dual-condition structure requiring both crossover and zero-line alignment. A Buy signal requires the MACD Line to cross above the Signal Line while remaining at or above zero (MACD Line >= 0.0). A Sell signal requires the MACD Line to cross below the Signal Line while remaining at or below zero (MACD Line <= 0.0). This prevents counter-trend entries against prevailing macro momentum.
4. Non-Repainting Calculation Model and Bar Execution
The indicator is built upon a strict non-repainting calculation model. Primary signals, visual chart arrows, and real-time alerts are evaluated exclusively on closed bars (historical index i, and newly closed bar rates_total - 2). The program does not use recalculating future data, center-of-gravity shifts, or bar-zero predictive extrapolation. Once a candle closes and a signal arrow is drawn, its position, price coordinates, and timestamp remain permanently fixed on historical charts.
5. Secondary Confirmation Engine: The 14 Modular Filters (MultiFilterSuite)
To eliminate false signals during sideways consolidation, each primary MACD trigger must pass through all active confirmation filters before an arrow or alert is dispatched:
- 1. RSI Cross Filter: Evaluates Relative Strength Index (default 14 period). Buy requires RSI crossing above oversold boundary (default 30.0). Sell requires RSI crossing below overbought boundary (default 70.0).
- 2. ADX Trend Strength Filter: Evaluates Average Directional Index (default 10 period). Signals are validated only when mainline ADX exceeds the minimum strength threshold (default 20.0), ensuring sufficient directional volatility.
- 3. Single Moving Average Filter: Uses a single baseline MA (default 50 SMA). Buy requires Close > MA. Sell requires Close < MA.
- 4. Ichimoku Senkou Span B Cloud Filter: References the 52-period Senkou Span B buffer. Buy requires Close > Senkou Span B. Sell requires Close < Senkou Span B.
- 5. RSI 75 Macro Bias Filter: Uses an extended 75-period RSI. Buy requires RSI 75 > 50.0. Sell requires RSI 75 < 50.0.
- 6. Double Moving Average Alignment Filter: Compares fast MA (default 30 EMA) and slow MA (default 140 EMA). Buy requires MA A > MA B. Sell requires MA A < MA B.
- 7. Awesome Oscillator (AO) Triple Filter: Assesses median price momentum via 5/34 SMA differentials with three sub-filters: Volume threshold (AO >= +4.0 for Buy, AO <= -4.0 for Sell), bar color slope (current AO > previous AO for Buy), and zero-line location (AO > 0 for Buy, AO < 0 for Sell).
- 8. Parabolic SAR Directional Filter: Tracks trailing price stops. Buy requires Close > SAR. Sell requires Close < SAR.
- 9. Heiken Ashi Trend Confirmation Filter: Reconstructs synthetic smoothed bars. Buy requires bullish candle body (ha_close > ha_open). Sell requires bearish candle body (ha_close < ha_open).
- 10. CCI Trend Filter: Evaluates Commodity Channel Index (default 50 period). Buy requires CCI > 0.0. Sell requires CCI < 0.0.
- 11. CCI Overbought / Oversold Filter: Evaluates cyclical extremes (default 14 period). Buy requires CCI > Oversold (-100.0). Sell requires CCI < Overbought (+100.0).
- 12. RVI Trend and Signal Line Filters: Evaluates Relative Vigor Index. Sub-filter A requires mainline RVI (period 75) > 0 for Buy and < 0 for Sell. Sub-filter B requires RVI line (period 20) > Signal line for Buy and < Signal line for Sell.
- 13. Secondary MACD Multi-Filter: Auxiliary MACD block offering histogram expansion filtering (Histogram > 0 for Buy, Histogram < 0 for Sell) and zero-line baseline filtering (MACD Line > 0 for Buy, MACD Line < 0 for Sell).
- 14. Support/Resistance and Fibonacci Confluence Filters:
* Dynamic Support/Resistance: Scans the previous N bars (default 50 period) to identify peak resistance and trough support. Validates signals only if current price touches or enters the defined tolerance zone (default 80 points) around support (Buy) or resistance (Sell).
* Fibonacci Swing Retracement: Runs an automated swing detection algorithm based on ZigZag depth, deviation, and backstep. Calculates the golden retracement zone between Level 1 (default 0.382) and Level 2 (default 0.618). Validates signals only when current candle range intersects this structural correction zone.
Key Features
- Three selectable primary entry mechanisms matching trend-following, momentum breakout, and mean-reversion trading methodologies.
- Four-color dynamic momentum histogram delivering immediate visual diagnostics of volume expansion, price acceleration, and momentum fading.
- Comprehensive 14-filter modular verification architecture (MultiFilterSuite), allowing independent or combined multi-indicator validation.
- Complete non-repainting calculation model: All signals, chart arrows, and alerts execute strictly upon confirmed candle close (closed bar index).
- High-contrast visual chart arrow annotations featuring customizable pixel size, distinct color coding, and user-defined point offset distances.
- Built-in multi-channel alert delivery suite supporting terminal pop-up alerts, localized sound playback, push notifications, and email alerts.
- Highly optimized C++ object-oriented architecture utilizing native MetaTrader 5 indicator handles to minimize memory overhead and CPU cycles.
- Direct programmatic compatibility with Expert Advisors via 4 standard indicator buffers and indexed chart graphical object names.
Operation and Setup Recommendations
- Asset Selection: Operates effectively across liquid financial markets including major and minor currency pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, USDCHF, NZDUSD, EURJPY, GBPJPY), commodities and precious metals (XAUUSD, XAGUSD, USOIL, UKOIL), global stock indices (US30, US500, NAS100, GER40, UK100, JP225), and liquid cryptocurrencies (BTCUSD, ETHUSD).
- Supported Timeframes: Engineered for universal timeframe deployment across M1, M5, M15, M30, H1, H4, D1, and W1 charts.
- Operational Style Recommendations:
* Short-Term Scalping (M1, M5): Pair Entry Method 0 (MACD Cross Signal) with fast volatility filters such as ADX Trend (Min Level 20.0), Parabolic SAR, or CCI Overbought/Oversold to capture immediate momentum surges while ignoring consolidations.
* Intraday Trading (M15, M30, H1): Combine Entry Method 0 or Method 2 (Cross Signal with Zero Confirmation) alongside trend-structural filters such as Double Moving Average (30 EMA and 140 EMA), Heiken Ashi direction, or Single 50 SMA.
* Swing and Position Trading (H4, D1): Utilize Entry Method 1 (MACD Zero Cross) or Method 2 coupled with macro filters such as RSI 75, Ichimoku Senkou Span B cloud boundaries, and the Fibonacci Swing Retracement golden pocket.
- Account and Execution Environment: Fully compatible with both Hedging and Netting MetaTrader 5 account types. Because signals are computed on closed bar data, execution latency and microsecond slippage do not degrade signal reliability. Low spread ECN accounts are recommended to minimize trading costs.
- Computational Performance: To ensure smooth operation on multi-chart configurations, the indicator creates internal indicator handles during initialization and deallocates them completely on deinitialization. Traders running numerous charts on low-resource machines can selectively enable only required filters to optimize performance.
Input Parameters List
All configurable parameters found within the MetaTrader 5 input dialog window are documented below with their default values and technical operational roles:
1. Primary Entry Logic and MACD Core Settings
- EntryMethod (Default: ENTRY_MACD_CROSS_SIGNAL) -> Dropdown selection defining the core triggering method: ENTRY_MACD_CROSS_SIGNAL (MACD crosses Signal Line), ENTRY_MACD_CROSS_ZERO (MACD crosses Zero Level), or ENTRY_MACD_CROSS_SIGNAL_ZERO (MACD crosses Signal Line confirmed by Zero Level). Unit: Enumeration.
- FastEMA (Default: 12) -> Number of bars applied to calculate the fast exponential moving average component. Unit: Bars.
- SlowEMA (Default: 26) -> Number of bars applied to calculate the slow exponential moving average component. Unit: Bars.
- SignalSMA (Default: 9) -> Lookback smoothing period applied to calculate the MACD Signal Line. Unit: Bars.
- AppliedPrice (Default: PRICE_CLOSE) -> Price series applied for MACD mathematical calculations (PRICE_CLOSE, PRICE_OPEN, PRICE_HIGH, PRICE_LOW, PRICE_MEDIAN, PRICE_TYPICAL, PRICE_WEIGHTED). Unit: Enumeration.
2. Visual Signal Arrows Settings
- ArrowDistance (Default: 30) -> Vertical spacing distance in points placed between the candle high/low price and the signal arrow tip. Unit: Points.
- ArrowSize (Default: 2) -> Graphical visual width and thickness of the rendered signal arrows, selectable on an integer scale from 1 to 5. Unit: Integer scale.
- BuyArrowColor (Default: clrAqua) -> Chart color applied to render bullish upward directional signal arrows (Wingdings code 233). Unit: Color palette.
- SellArrowColor (Default: clrRed) -> Chart color applied to render bearish downward directional signal arrows (Wingdings code 234). Unit: Color palette.
- ShowArrows (Default: true) -> Toggles the automatic creation and display of directional signal arrows on the chart. Unit: Boolean (true/false).
3. Alerts and Notification Settings
- EnableAlert (Default: true) -> Enables or disables native MetaTrader 5 modal pop-up alert dialog boxes upon signal generation. Unit: Boolean (true/false).
- EnableSound (Default: true) -> Enables or disables audible sound playback when a valid signal trigger is confirmed on candle close. Unit: Boolean (true/false).
- AlertSoundFile (Default: "alert.wav") -> Specifies the audio filename located in the terminal Sounds folder to be played on alert events. Unit: String text.
- EnablePush (Default: false) -> Dispatches push notifications to registered iOS and Android mobile terminals via MetaQuotes ID. Unit: Boolean (true/false).
- EnableEmail (Default: false) -> Dispatches automated email notifications to the mailbox configured in terminal options. Unit: Boolean (true/false).
4. MultiFilterSuite: RSI Cross Filter
- Use_RSI_Cross_Filter (Default: false) -> Activates or deactivates the Relative Strength Index boundary cross confirmation filter. Unit: Boolean (true/false).
- RSI_Length (Default: 14) -> Lookback averaging period applied for Relative Strength Index calculation. Unit: Bars.
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied price series dataset utilized in RSI mathematical calculation. Unit: Enumeration.
- RSI_Oversold (Default: 30.0) -> Lower boundary threshold level; Buy signals require RSI to cross upward above this level. Unit: Index value (0 to 100).
- RSI_Overbought (Default: 70.0) -> Upper boundary threshold level; Sell signals require RSI to cross downward below this level. Unit: Index value (0 to 100).
5. MultiFilterSuite: ADX Trend Filter
- Use_ADX_Filter (Default: false) -> Activates or deactivates the Average Directional Movement Index minimum strength filter. Unit: Boolean (true/false).
- ADX_Period (Default: 10) -> Calculation lookback period applied to the Average Directional Index line. Unit: Bars.
- ADX_Min_Level (Default: 20.0) -> Minimum threshold value required on the mainline ADX; values below this level block signal generation. Unit: Index value (0 to 100).
6. MultiFilterSuite: Single MA Filter
- Use_MA_Filter (Default: false) -> Activates or deactivates baseline single moving average position filtering. Unit: Boolean (true/false).
- MA_Period (Default: 50) -> Averaging period applied to compute the baseline single moving average. Unit: Bars.
- MA_Method (Default: MODE_SMA) -> Mathematical smoothing method applied to the moving average (MODE_SMA, MODE_EMA, MODE_SMMA, MODE_LWMA). Unit: Enumeration.
- MA_Shift (Default: 0) -> Horizontal bar offset displacement applied to the moving average plot. Unit: Bars.
7. MultiFilterSuite: Ichimoku Senkou Span B Filter
- Use_Ichimoku_Filter (Default: false) -> Activates or deactivates the Ichimoku Kinko Hyo Senkou Span B structural cloud baseline filter. Unit: Boolean (true/false).
- Ichimoku_Tenkan (Default: 9) -> Lookback period applied to calculate the Tenkan-sen conversion line. Unit: Bars.
- Ichimoku_Kijun (Default: 26) -> Lookback period applied to calculate the Kijun-sen base line. Unit: Bars.
- Ichimoku_SenkouB (Default: 52) -> Lookback period applied to calculate the Senkou Span B leading cloud boundary. Unit: Bars.
8. MultiFilterSuite: RSI 75 Filter
- Use_RSI75_Filter (Default: false) -> Activates or deactivates macro trend equilibrium filtering using an extended RSI period. Unit: Boolean (true/false).
- RSI_Filter_Period (Default: 75) -> Lookback averaging period applied to compute the long-term trend RSI. Unit: Bars.
9. MultiFilterSuite: Double MA Filter
- Use_DoubleMA_Filter (Default: false) -> Activates or deactivates dual moving average structural alignment filtering. Unit: Boolean (true/false).
- MA_A_Period (Default: 30) -> Lookback averaging period applied to the fast moving average MA A. Unit: Bars.
- MA_A_Method (Default: MODE_EMA) -> Smoothing method applied to the fast moving average MA A. Unit: Enumeration.
- MA_A_Applied (Default: PRICE_CLOSE) -> Applied price series dataset used to calculate fast moving average MA A. Unit: Enumeration.
- MA_A_Shift (Default: 0) -> Horizontal bar displacement offset for fast moving average MA A. Unit: Bars.
- MA_B_Period (Default: 140) -> Lookback averaging period applied to the slow moving average MA B. Unit: Bars.
- MA_B_Method (Default: MODE_EMA) -> Smoothing method applied to the slow moving average MA B. Unit: Enumeration.
- MA_B_Applied (Default: PRICE_CLOSE) -> Applied price series dataset used to calculate slow moving average MA B. Unit: Enumeration.
- MA_B_Shift (Default: 0) -> Horizontal bar displacement offset for slow moving average MA B. Unit: Bars.
10. MultiFilterSuite: Awesome Oscillator Filter
- Use_AO_Filter (Default: false) -> Activates or deactivates the primary Awesome Oscillator evaluation framework. Unit: Boolean (true/false).
- Use_AO_Volume_Filter (Default: false) -> Enforces minimum absolute magnitude thresholds on the AO histogram reading. Unit: Boolean (true/false).
- AO_Buy_Min (Default: 4.0) -> Minimum positive threshold value required on AO to validate Buy signals. Unit: Value points.
- AO_Sell_Max (Default: -4.0) -> Maximum negative threshold value required on AO to validate Sell signals. Unit: Value points.
- Use_AO_Color_Filter (Default: false) -> Requires the current AO bar to be greater than the previous bar for Buy, and lower for Sell. Unit: Boolean (true/false).
- Use_AO_Zero_Filter (Default: false) -> Requires the AO bar to be above zero and rising for Buy, below zero and falling for Sell. Unit: Boolean (true/false).
11. MultiFilterSuite: Parabolic SAR Filter
- Use_SAR_Filter (Default: false) -> Activates or deactivates price position filtering relative to Parabolic SAR stop points. Unit: Boolean (true/false).
- SAR_Step (Default: 0.02) -> Acceleration factor incremental step value applied to SAR trailing calculation. Unit: Decimal step.
- SAR_Maximum (Default: 0.2) -> Maximum acceleration factor ceiling applied to SAR calculation. Unit: Decimal cap.
12. MultiFilterSuite: Heiken Ashi Filter
- Use_HeikenAshi_Filter (Default: false) -> Activates or deactivates synthetic smoothed candlestick directional filtering. Unit: Boolean (true/false).
13. MultiFilterSuite: CCI Trend Filter
- Use_CCI_Filter (Default: false) -> Activates or deactivates zero-line directional Commodity Channel Index filtering. Unit: Boolean (true/false).
- CCI_Period (Default: 50) -> Lookback averaging period applied to calculate the trend CCI line. Unit: Bars.
- CCI_Applied (Default: PRICE_CLOSE) -> Applied price series dataset utilized for CCI trend calculation. Unit: Enumeration.
14. MultiFilterSuite: CCI OB and OS Filter
- Use_CCI_OBOS_Filter (Default: false) -> Activates or deactivates cyclical extreme threshold validation via short-term CCI. Unit: Boolean (true/false).
- CCI_OBOS_Period (Default: 14) -> Calculation lookback period applied to cyclical overbought/oversold CCI. Unit: Bars.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Applied price series dataset utilized for cyclical CCI calculation. Unit: Enumeration.
- CCI_Overbought (Default: 100.0) -> Upper extreme threshold level; Sell signals require CCI to cross below this level. Unit: Index value.
- CCI_Oversold (Default: -100.0) -> Lower extreme threshold level; Buy signals require CCI to cross above this level. Unit: Index value.
15. MultiFilterSuite: RVI Filters
- Use_RVI_Filter (Default: false) -> Activates or deactivates mainline Relative Vigor Index polarity filtering relative to zero. Unit: Boolean (true/false).
- RVI_Period (Default: 75) -> Lookback averaging period applied to calculate the mainline Relative Vigor Index. Unit: Bars.
- Use_RVI_Signal_Filter (Default: false) -> Activates or deactivates RVI signal line crossover alignment confirmation. Unit: Boolean (true/false).
- RVI_Signal_Period (Default: 20) -> Calculation lookback period applied to the secondary RVI signal line filter. Unit: Bars.
16. MultiFilterSuite: MACD Secondary Filters
- Use_MACD_Filter (Default: false) -> Activates or deactivates secondary MACD histogram polarity validation. Unit: Boolean (true/false).
- MACD_FastEMA (Default: 12) -> Fast exponential moving average period for the secondary confirmation MACD. Unit: Bars.
- MACD_SlowEMA (Default: 26) -> Slow exponential moving average period for the secondary confirmation MACD. Unit: Bars.
- MACD_SignalSMA (Default: 9) -> Smoothing period applied to calculate the secondary MACD signal line. Unit: Bars.
- MACD_Applied (Default: PRICE_CLOSE) -> Applied price dataset utilized for secondary MACD calculation. Unit: Enumeration.
- Use_MACD_Zero_Filter (Default: false) -> Requires secondary MACD mainline to be above zero for Buy and below zero for Sell. Unit: Boolean (true/false).
17. MultiFilterSuite: Support, Resistance and Fibonacci Filters
- Use_SR_Filter (Default: false) -> Activates or deactivates rolling peak resistance and trough support proximity filtering. Unit: Boolean (true/false).
- SR_Period (Default: 50) -> Historical bar lookback horizon scanned to detect absolute highest and lowest price levels. Unit: Bars.
- SR_Zone_Points (Default: 80) -> Price proximity tolerance buffer in points surrounding detected support and resistance levels. Unit: Points.
- Use_Fib_Filter (Default: false) -> Activates or deactivates ZigZag-based Fibonacci retracement golden zone filtering. Unit: Boolean (true/false).
- Fib_Level_1 (Default: 0.382) -> Lower ratio boundary defining the Fibonacci structural retracement pocket. Unit: Ratio decimal.
- Fib_Level_2 (Default: 0.618) -> Upper ratio boundary defining the Fibonacci structural retracement pocket. Unit: Ratio decimal.
- ZigZag_Depth (Default: 12) -> Minimum bar interval required between consecutive candidate swing pivot extremes. Unit: Bars.
- ZigZag_Deviation (Default: 5) -> Minimum price deviation in points required to confirm a new swing pivot point. Unit: Points.
- ZigZag_Backstep (Default: 3) -> Minimum number of intervening bars required between identified swing high and low nodes. Unit: Bars.
Technical Architecture and Buffer Indexing for EA Integration
The indicator provides full programmatic accessibility for algorithmic developers building Expert Advisors in MQL5:
- Separate Window Execution: Operates within a dedicated indicator sub-window without cluttering the main price chart.
- Buffer 0 (HistogramBuffer): Stores the numeric value of the MACD momentum histogram (MACD Line minus Signal Line). Plotted as DRAW_COLOR_HISTOGRAM.
- Buffer 1 (HistogramColors): Stores the active dynamic color index: Index 0 (LimeGreen = Bullish Acceleration), Index 1 (DarkGreen = Bullish Deceleration), Index 2 (Red = Bearish Acceleration), Index 3 (Maroon = Bearish Deceleration).
- Buffer 2 (MACDLineBuffer): Stores standard floating-point values of the main MACD Line. Plotted as DRAW_LINE.
- Buffer 3 (SignalLineBuffer): Stores floating-point values of the Signal Line. Plotted as DRAW_LINE.
- Arrow Object Inspection: In addition to buffers, automated systems can track confirmed chart arrow objects identified by prefixes 'MACD_SIG_BUY_' and 'MACD_SIG_SELL_'.
Risk Disclaimer
Trading foreign exchange, precious metals, equities, indices, and financial derivatives carries a substantial level of risk and may not be suitable for all investors. The high degree of financial leverage available can work against you as well as for you. Before deciding to trade financial instruments, carefully consider your investment objectives, level of experience, and risk appetite. Past performance, backtest simulations, and historical chart results do not represent a guarantee of future outcomes. This software is an analytical technical indicator intended to support independent trade analysis; it does not provide direct financial advice or guarantee profitability. Always thoroughly test the indicator on a demo account across varying market conditions before deploying it in live trading environments.
