ADX Crossover Multi Filter Signal Trend Momentum
- Indicatori
- Versione: 1.0
- Attivazioni: 5
Overview
ADX Multi Filter Signal Arrow is a technical analysis indicator for MetaTrader 4 (MT4) designed to detect directional momentum shifts using the Average Directional Movement Index (ADX) paired with a modular 15-filter validation suite and automated Average True Range (ATR) risk-reward level plotting. The indicator evaluates Directional Movement (+DI and -DI) threshold crossovers exclusively on confirmed closed bars and plots non-repainting Buy and Sell arrows directly on the main price chart. Alongside visual arrow signals, it calculates and renders dynamic Entry, Stop Loss (SL), and multi-tier Take Profit (TP1, TP2, TP3) horizontal reference lines based on ATR volatility measurements. All calculations operate inside a single self-contained indicator module, allowing traders to combine trend, oscillator, momentum, and price-structure confirmations without attaching separate indicators to the chart.
Operating Principle and Signal Logic
The indicator operates through a sequential four-stage technical evaluation pipeline executed upon bar closure:
- Core Directional Momentum Detection: The primary engine monitors the positive directional indicator (+DI) and negative directional indicator (-DI) derived from the built-in Wilder ADX calculation on closing prices. A raw bullish trigger occurs when +DI crosses upward across the user-defined threshold level on the most recently completed candle (Bar 1). Conversely, a raw bearish trigger occurs when -DI crosses upward across the threshold level on Bar 1. Evaluating threshold breakouts on the directional components rather than main-line slope alone helps isolate emerging directional pressure at the close of a candle.
- Modular Multi-Filter Confluence Validation: Whenever a raw directional crossover is detected on Bar 1, the candidate signal passes through up to 15 optional technical confirmation modules. Each active filter independently evaluates market structure, moving average alignment, oscillator momentum, volatility regime, or dynamic support and resistance proximity using closed-bar data. Filters operate under logical conjunction, meaning all enabled filter modules must validate the directional bias before a Buy or Sell arrow is plotted.
- Non-Repainting Closed-Bar Execution: All directional crossover checks and multi-filter validations are locked strictly to completed candles (Shift 1 and historical closed bars). The currently forming candle (Bar 0) is explicitly excluded from signal assignment and alert dispatch. Once a Buy or Sell arrow appears after a candle closes, it remains fixed at that bar coordinate and does not repaint, recalculate backward, shift, or vanish on subsequent ticks.
- Automated ATR Risk-to-Reward Mapping: When target level rendering is enabled, the indicator locates the latest confirmed signal candle on the chart, reads the ATR volatility value at that bar, and multiplies it by the configured risk factor to establish a 1R volatility distance. Using the signal candle closing price as the Entry reference, it projects a Stop Loss level at 1R against the signal direction and three progressive Take Profit levels at 1R (TP1), 2R (TP2), and 3R (TP3) in the signal direction.
Key Technical Features
- Non-repainting Buy and Sell arrow signals plotted directly on the main MetaTrader 4 price chart after candle closure.
- Configurable core ADX period, +DI/-DI breakout threshold level, arrow vertical offset in points, and arrow icon display size.
- Integrated 15-module technical filter framework covering RSI, secondary ADX, Single Moving Average, Ichimoku Senkou Span B, long-period RSI, Double Moving Average, Awesome Oscillator, Parabolic SAR, Heiken Ashi, CCI trend, CCI overbought/oversold, RVI trend and signal, MACD histogram and zero-line, Support/Resistance with Fibonacci retracement zones, and Wilder ATR-based trend bands.
- Automatic chart rendering of horizontal Entry, Stop Loss, TP1 (1R), TP2 (2R), and TP3 (3R) segments with customizable line colors, line styles, line widths, right-bar extension, and text label font sizes.
- Four-channel notification system supporting MetaTrader 4 terminal pop-up alerts, customizable WAV audio files for Buy and Sell events, mobile push notifications via MetaQuotes ID, and SMTP email alerts.
- Built-in duplicate-alert state tracking ensuring notifications are dispatched only once per newly closed signal bar.
- Clean chart object lifecycle management that removes indicator-generated lines and labels automatically upon indicator removal, parameter reset, or timeframe switch.
- Self-contained execution architecture requiring no external DLL files, external data feeds, or auxiliary custom indicators in the terminal folder.
Detailed Functional Breakdown of the 15 Modular Filters
Each filter module can be toggled independently to build a customized multi-confirmation rule set tailored to specific market conditions:
- Filter 1 (RSI Cross Confirmation): Evaluates whether the Relative Strength Index crosses specified oversold or overbought thresholds on the signal candle, helping confirm momentum reversals out of stretched price zones.
- Filter 2 (Secondary ADX Trend Strength): Checks that the main ADX line remains above a minimum threshold level using a separate lookback period, filtering out signals during low-momentum range compression.
- Filter 3 (Single Moving Average Trend Bias): Compares the signal candle closing price against a configurable Moving Average (SMA, EMA, SMMA, or LWMA) to restrict Buy signals above the baseline and Sell signals below it.
- Filter 4 (Ichimoku Senkou Span B Baseline): Uses the long-term Ichimoku Senkou Span B cloud boundary as a structural equilibrium filter so signals align with broader cloud polarity.
- Filter 5 (Long-Period RSI Macro Midline): Evaluates a 75-period RSI relative to its 50.0 midpoint to confirm whether macro directional momentum favors bullish or bearish continuation.
- Filter 6 (Double Moving Average Alignment): Requires a faster Moving Average (MA A) and a slower Moving Average (MA B) to maintain directional separation, confirming multi-tier trend structure.
- Filter 7 (Awesome Oscillator Momentum Suite): Provides three independent sub-conditions for the Awesome Oscillator—minimum histogram amplitude, bar-over-bar histogram slope color, and zero-line polarity—to verify accelerating momentum.
- Filter 8 (Parabolic SAR Trend Position): Checks closing price orientation relative to Parabolic Stop and Reverse dots so signals follow active trailing trend direction.
- Filter 9 (Heiken Ashi Smoothed Candle Polarity): Computes internal smoothed Heiken Ashi open and close values to confirm that the underlying candle body reflects bullish or bearish directional consistency.
- Filter 10 (CCI Zero-Line Directional Trend): Evaluates a medium-period Commodity Channel Index against the zero axis to confirm sustained directional deviation from statistical mean price.
- Filter 11 (CCI Overbought and Oversold Expansion): Uses a short-period CCI threshold check to verify strong directional impulse bursts beyond standard channel boundaries.
- Filter 12 (RVI Trend and Signal Alignment): Combines a long-period Relative Vigor Index zero-line check with a shorter-period RVI main-versus-signal line comparison to confirm closing-price vigor.
- Filter 13 (MACD Histogram and Zero-Axis Filter): Separates MACD validation into histogram polarity (MACD main versus signal line) and zero-line positioning to confirm trend-momentum alignment.
- Filter 14 (Support, Resistance, and Fibonacci Zones): Scans recent swing highs and lows to define dynamic Support and Resistance tolerance bands, and uses ZigZag pivot detection to map Fibonacci retracement pullback zones.
- Filter 15 (Wilder ATR Trend Band / Supertrend): Implements a Wilder ATR volatility band regime check to confirm that price remains within an active bullish or bearish trend phase.
Graphical Elements, Risk-Reward Overlay, and Alert System
- Chart Visual Indicators: Confirmed bullish signals render an upward lime arrow (Wingdings 233) positioned below the signal candle low by the configured point offset, while confirmed bearish signals render a downward red arrow (Wingdings 234) positioned above the signal candle high.
- Dynamic ATR Target Level Line Overlay: For the most recent confirmed signal on the active chart, the indicator draws a solid horizontal Entry line from the signal candle close, a dashed Stop Loss (1R) line, and three dashed Take Profit lines (TP1 at 1R, TP2 at 2R, and TP3 at 3R). All five horizontal segments extend dynamically to the right of the current live candle by the specified bar count and display right-aligned price labels formatted to the symbol decimal digits.
- Automatic Target Level Updates: Whenever a newer confirmed Buy or Sell signal forms on a subsequent closed candle, the previous signal target lines automatically relocate to the new signal candle and recalculate Entry, SL, TP1, TP2, and TP3 using the ATR value of that new signal bar. If InpShowLines is disabled, all target lines and labels are immediately cleared from the chart.
- Multi-Channel Alert Payload: Whenever a confirmed signal forms on a newly closed candle (Bar 1), enabled alert channels receive a structured report containing the signal direction (BUY or SELL), symbol ticker, active timeframe, Entry price, Stop Loss price, TP1, TP2, TP3, and exact bar timestamp.
- Anti-Spam Alert State Management: When Alert_On_NewBarOnly is active, the indicator stores the timestamp of the last dispatched Buy and Sell alert separately, preventing repeated pop-ups, sounds, push notifications, or emails during intra-bar tick updates.
- Historical Bar Initialization and Live Tick Synchronization: Upon loading onto a chart, the indicator evaluates historical closed bars after the required warm-up window and plots past confirmed arrows for visual reference, while live incoming ticks evaluate only the newly completed bar boundary without altering prior signals.
- Computational Efficiency: Historical signal and filter buffers are evaluated once during initialization, while live ticks update only the newest bar boundary. Disabling unused filter modules skips their underlying indicator calls to keep CPU and memory usage lightweight across multiple open charts.
Operation and Setup Recommendations
- Supported Financial Instruments: Suitable for major and minor Forex currency pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, NZDUSD, EURJPY, GBPJPY), precious metals (XAUUSD, XAGUSD), stock indices, and liquid CFD symbols.
- Recommended Timeframes: Compatible with all standard MetaTrader 4 timeframes from M1 to D1. Lower timeframes (M5, M15) suit intraday momentum setups when paired with trend filters, while M30, H1, and H4 provide broader structural filtering and cleaner ATR target spacing.
- Account and Broker Environment: Works on both Hedging and Netting account types across Standard, ECN, and Raw Spread brokers. Because Entry and ATR target levels are referenced from the signal candle close, low-spread ECN accounts are recommended when applying the indicator on lower timeframes (M1 to M15).
- Practical Configuration Workflow: All 15 supplementary filters default to false so users can observe baseline ADX threshold signals immediately upon attaching the indicator, then selectively enable one to three complementary filters (such as a trend baseline filter combined with a momentum filter) suited to their chosen symbol and timeframe.
- Multi-Chart Usage Note: When attaching the indicator simultaneously to numerous charts with swing-based filters enabled (such as Support/Resistance or Fibonacci), consider adjusting chart history bar limits in MetaTrader 4 Tools > Options > Charts to maintain responsive terminal performance.
Input Parameters Reference
Core ADX Signal Settings
- InpPeriod (Default: 5) -> Lookback period in bars used to calculate the ADX, +DI, and -DI lines.
- InpLevel (Default: 25.0) -> Threshold level in index units that +DI or -DI must cross upward to trigger a raw directional signal.
- InpArrowDistance (Default: 30) -> Vertical offset distance in points between the signal candle high or low and the plotted arrow.
- InpArrowSize (Default: 2) -> Visual size of the Buy and Sell signal arrows plotted on the chart (scale from 1 to 5).
ATR and Target Levels (SL and TP)
- InpShowLines (Default: true) -> Enables or disables automatic rendering of Entry, Stop Loss, and Take Profit lines on the chart.
- InpAtrPeriod (Default: 7) -> Lookback period in bars for the Average True Range (ATR) volatility calculation.
- InpAtrMultiplier (Default: 1.5) -> Multiplier factor applied to the ATR value to establish the 1R Stop Loss distance from Entry.
- InpRightBars (Default: 1) -> Number of bars extending the horizontal target lines to the right of the current live candle.
- InpFontSize (Default: 8) -> Font size in points for the Entry, SL, TP1, TP2, and TP3 text labels on the chart.
- InpColorEntry (Default: clrGold) -> Line and label color for the Entry reference level.
- InpColorSL (Default: clrRed) -> Line and label color for the Stop Loss (1R) level.
- InpColorTP1 (Default: clrLimeGreen) -> Line and label color for the Take Profit 1 (1R) level.
- InpColorTP2 (Default: clrMediumSeaGreen) -> Line and label color for the Take Profit 2 (2R) level.
- InpColorTP3 (Default: clrDodgerBlue) -> Line and label color for the Take Profit 3 (3R) level.
- InpLineStyle (Default: STYLE_DASH) -> Visual line style (solid, dash, dot, dashdot) applied to Stop Loss and Take Profit lines.
- InpLineWidth (Default: 1) -> Line thickness in pixels for the Entry, Stop Loss, and Take Profit horizontal segments.
Alert and Notification Settings
- Use_Popup_Alert (Default: true) -> Enables or disables the MetaTrader 4 terminal pop-up alert window on confirmed signals.
- Use_Sound_Alert (Default: true) -> Enables or disables WAV audio file playback on confirmed signals.
- Sound_Buy_File (Default: "alert.wav") -> Audio file name inside the MetaTrader Sounds directory played on Buy signals.
- Sound_Sell_File (Default: "alert2.wav") -> Audio file name inside the MetaTrader Sounds directory played on Sell signals.
- Use_Push_Notify (Default: true) -> Enables or disables mobile push notifications delivered via MetaQuotes ID.
- Use_Email_Alert (Default: false) -> Enables or disables email notifications sent through the terminal SMTP settings.
- Alert_On_NewBarOnly (Default: true) -> Restricts alert notifications to once per newly closed candle to prevent duplicate alerts.
Filter 1: RSI Cross Filter
- Use_RSI_Cross_Filter (Default: false) -> Enables or disables the Relative Strength Index (RSI) threshold crossover filter.
- RSI_Length (Default: 14) -> Lookback period in bars for the RSI calculation.
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied candle price source (Close, Open, High, Low, Median, Typical, Weighted) for RSI.
- RSI_Oversold (Default: 30.0) -> Lower RSI threshold level in index units checked during bullish momentum confirmation.
- RSI_Overbought (Default: 70.0) -> Upper RSI threshold level in index units checked during bearish momentum confirmation.
Filter 2: Secondary ADX Trend Filter
- Use_ADX_Filter (Default: false) -> Enables or disables the secondary ADX main-line trend-strength filter.
- ADX_Period (Default: 10) -> Lookback period in bars for the secondary ADX trend-strength calculation.
- ADX_Min_Level (Default: 20.0) -> Minimum ADX main-line value in index units required to confirm active trend strength.
Filter 3: Single Moving Average Filter
- Use_MA_Filter (Default: false) -> Enables or disables the Single Moving Average (MA) directional trend filter.
- MA_Period (Default: 50) -> Averaging period in bars for the Single Moving Average trend filter.
- MA_Method (Default: MODE_SMA) -> Smoothing method (SMA, EMA, SMMA, or LWMA) applied to the Single Moving Average.
- MA_Shift (Default: 0) -> Horizontal bar shift applied to the Single Moving Average series.
Filter 4: Ichimoku Senkou Span B Filter
- Use_Ichimoku_Filter (Default: false) -> Enables or disables the Ichimoku Kinko Hyo Senkou Span B baseline trend filter.
- Ichimoku_Tenkan (Default: 9) -> Tenkan-sen (Conversion Line) lookback period in bars.
- Ichimoku_Kijun (Default: 26) -> Kijun-sen (Base Line) lookback period in bars.
- Ichimoku_SenkouB (Default: 52) -> Senkou Span B (Leading Span B) lookback period in bars defining the structural cloud boundary.
Filter 5: Long-Period RSI Macro Filter
- Use_RSI75_Filter (Default: false) -> Enables or disables the long-period RSI midline directional bias filter.
- RSI_Filter_Period (Default: 75) -> Lookback period in bars for the long-period RSI bias calculation.
Filter 6: Double Moving Average Alignment Filter
- Use_DoubleMA_Filter (Default: false) -> Enables or disables the Dual Moving Average trend-alignment filter.
- MA_A_Period (Default: 30) -> Averaging period in bars for the fast Moving Average (MA A).
- MA_A_Method (Default: MODE_EMA) -> Smoothing method applied to the fast Moving Average (MA A).
- MA_A_Applied (Default: PRICE_CLOSE) -> Applied candle price type used for the fast Moving Average (MA A).
- MA_A_Shift (Default: 0) -> Horizontal bar shift applied to the fast Moving Average (MA A).
- MA_B_Period (Default: 140) -> Averaging period in bars for the slow Moving Average (MA B).
- MA_B_Method (Default: MODE_EMA) -> Smoothing method applied to the slow Moving Average (MA B).
- MA_B_Applied (Default: PRICE_CLOSE) -> Applied candle price type used for the slow Moving Average (MA B).
- MA_B_Shift (Default: 0) -> Horizontal bar shift applied to the slow Moving Average (MA B).
Filter 7: Awesome Oscillator Filter
- Use_AO_Filter (Default: false) -> Enables or disables the Awesome Oscillator (AO) momentum validation module.
- Use_AO_Volume_Filter (Default: false) -> Enables or disables minimum AO histogram amplitude threshold validation.
- AO_Buy_Min (Default: 4.0) -> Minimum positive AO value required for Buy signals when amplitude filtering is active.
- AO_Sell_Max (Default: -4.0) -> Maximum negative AO value required for Sell signals when amplitude filtering is active.
- Use_AO_Color_Filter (Default: false) -> Enables or disables bar-over-bar AO histogram slope direction validation.
- Use_AO_Zero_Filter (Default: false) -> Enables or disables AO zero-line polarity and directional momentum alignment.
Filter 8: Parabolic SAR Filter
- Use_SAR_Filter (Default: false) -> Enables or disables the Parabolic Stop and Reverse (SAR) trend-position filter.
- SAR_Step (Default: 0.02) -> Acceleration factor step increment used in the Parabolic SAR calculation.
- SAR_Maximum (Default: 0.2) -> Maximum acceleration factor limit used in the Parabolic SAR calculation.
Filter 9: Heiken Ashi Candle Filter
- Use_HeikenAshi_Filter (Default: false) -> Enables or disables smoothed Heiken Ashi candle body polarity confirmation.
Filter 10: CCI Trend Filter
- Use_CCI_Filter (Default: false) -> Enables or disables the Commodity Channel Index (CCI) zero-line directional filter.
- CCI_Period (Default: 50) -> Lookback period in bars for the CCI zero-line trend calculation.
- CCI_Applied (Default: PRICE_CLOSE) -> Applied candle price type used for the CCI trend calculation.
Filter 11: CCI Overbought and Oversold Filter
- Use_CCI_OBOS_Filter (Default: false) -> Enables or disables the short-period CCI momentum expansion filter.
- CCI_OBOS_Period (Default: 14) -> Lookback period in bars for the short-period CCI calculation.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Applied candle price type used for the short-period CCI calculation.
- CCI_Overbought (Default: 100.0) -> Upper CCI threshold in index units evaluated for bullish momentum confirmation.
- CCI_Oversold (Default: -100.0) -> Lower CCI threshold in index units evaluated for bearish momentum confirmation.
Filter 12: RVI Trend and Signal Filter
- Use_RVI_Filter (Default: false) -> Enables or disables the Relative Vigor Index (RVI) zero-line polarity filter.
- RVI_Period (Default: 75) -> Lookback period in bars for the RVI zero-line trend calculation.
- Use_RVI_Signal_Filter (Default: false) -> Enables or disables the RVI main-line versus signal-line alignment filter.
- RVI_Signal_Period (Default: 20) -> Lookback period in bars for the RVI signal alignment calculation.
Filter 13: MACD Histogram and Zero-Line Filter
- Use_MACD_Filter (Default: false) -> Enables or disables the Moving Average Convergence Divergence (MACD) histogram polarity filter.
- MACD_FastEMA (Default: 12) -> Fast Exponential Moving Average period in bars for the MACD calculation.
- MACD_SlowEMA (Default: 26) -> Slow Exponential Moving Average period in bars for the MACD calculation.
- MACD_SignalSMA (Default: 9) -> Signal line Simple Moving Average period in bars for the MACD calculation.
- MACD_Applied (Default: PRICE_CLOSE) -> Applied candle price type used for the MACD calculation.
- Use_MACD_Zero_Filter (Default: false) -> Enables or disables the MACD main-line zero-axis position filter.
Filter 14: Support, Resistance, and Fibonacci Filter
- Use_SR_Filter (Default: false) -> Enables or disables the dynamic Support and Resistance zone proximity filter.
- SR_Period (Default: 50) -> Lookback window in bars used to detect recent structural swing highs and lows.
- SR_Zone_Points (Default: 80) -> Proximity tolerance band width in points around detected Support and Resistance levels.
- Use_Fib_Filter (Default: false) -> Enables or disables the swing-based Fibonacci retracement pullback zone filter.
- Fib_Level_1 (Default: 0.382) -> First Fibonacci retracement ratio defining the pullback zone boundary.
- Fib_Level_2 (Default: 0.618) -> Second Fibonacci retracement ratio defining the pullback zone boundary.
- ZigZag_Depth (Default: 12) -> Minimum bar depth required to identify swing pivot highs and lows for Fibonacci mapping.
- ZigZag_Deviation (Default: 5) -> Minimum price deviation in points required to validate a new swing pivot.
- ZigZag_Backstep (Default: 3) -> Minimum bar separation between consecutive swing pivot highs or lows.
Filter 15: ATR Trend Band Filter (Supertrend)
- Use_Supertrend_Filter (Default: false) -> Enables or disables the Wilder ATR-based directional trend band filter.
- ST_AtrPeriod (Default: 10) -> Wilder ATR lookback period in bars used to compute the volatility band width.
- ST_Factor (Default: 3.0) -> Multiplier factor applied to the ATR value to construct the upper and lower trend bands.
Installation and Alert Configuration Notes
- Indicator Installation: Place the compiled indicator file inside the MetaTrader 4 MQL4/Indicators directory, refresh the Navigator panel, and attach the indicator to the desired price chart. No external libraries or DLL imports are required.
- Custom Audio Alerts: To use custom Buy or Sell sound alerts, copy valid WAV audio files into the MetaTrader 4 Sounds directory and enter the exact filenames (including the .wav extension) in Sound_Buy_File and Sound_Sell_File.
- Push and Email Notifications: For mobile push alerts, enter your MetaQuotes ID under MetaTrader 4 Tools > Options > Notifications and enable Use_Push_Notify. For email alerts, configure your SMTP server credentials under Tools > Options > Email before enabling Use_Email_Alert.
Risk Disclaimer
Trading foreign exchange, commodities, indices, and other financial instruments involves significant risk of capital loss and may not be suitable for all investors. Past performance and historical chart signals do not guarantee future trading results. This indicator is an analytical software utility designed solely to assist traders in technical chart evaluation and does not constitute financial or investment advice. Always test the product thoroughly on a demo account to understand its operational behavior and parameter settings before applying it to live trading decisions.
