Pro RVI Signal Multi Filter Trend Reversal MT5
- Indicatori
- Versione: 1.21
Product Overview: Relative Vigor Index Multi-Filter Technical System
The Relative Vigor Index (RVI) Multi-Filter Indicator is a comprehensive technical analysis engine developed for the MetaTrader 5 terminal. Designed to identify cyclical momentum shifts, trend continuations, and structural market turning points, this analytical system couples the classic Relative Vigor Index formula with an advanced multi-layered confirmation matrix consisting of 17 distinct technical filters.
Rather than relying on isolated oscillator signals that are susceptible to whipsaws during low-volatility consolidation or strong parabolic counter-trends, this indicator enables systematic confluence verification. Traders can selectively engage trend baselines, momentum oscillators, price action support and resistance bounds, volatility envelopes, and algorithmic Fibonacci retracement zones to confirm signals before execution.
Core Architectural Principles
1. Signal Calculation and Repaint Behavior:
The core crossover calculations and filtering mechanisms evaluate completed historical price data on closed bars (Bar Index 1). Visual arrow indicators and execution alerts are deployed exclusively upon the close of the candle. Once the candle closes and the alert is rendered, the data buffer values and graphical arrows remain fixed. The indicator does not recalculate, shift, or repaint historical signals on past candles.
2. Modular Filter Matrix:
All 17 confirmation filters operate under a modular boolean architecture. If a filter group is disabled, it is completely bypassed during computation, preserving computational resources. When multiple filters are enabled, the system requires unanimous directional agreement across all active modules before issuing a valid Buy or Sell signal arrow.
3. Execution Flexibility:
The software functions as an on-chart visual guide with customizable arrow markers and a separate-window oscillator plot. It also houses an integrated notification engine capable of delivering pop-up alerts, localized audio prompts, and mobile push notifications via the MetaQuotes ID network.
Mathematical Foundation and Primary Crossover Mechanics
The baseline oscillator is computed using the standard Relative Vigor Index formulation originally introduced by John Ehlers. The premise of the calculation is that prices in an upward trend typically close higher than they open, whereas prices in a downward trend close lower than they open.
The indicator computes the primary RVI value using a 4-period symmetrically weighted moving average of the price delta (Close minus Open) divided by a 4-period symmetrically weighted moving average of the total bar range (High minus Low):
- Value Vector (Numerator Component): ((Close - Open) + 2 * (Close[1] - Open[1]) + 2 * (Close[2] - Open[2]) + (Close[3] - Open[3])) / 6.0
- Range Vector (Denominator Component): ((High - Low) + 2 * (High[1] - Low[1]) + 2 * (High[2] - Low[2]) + (High[3] - Low[3])) / 6.0
The final RVI Main Line is derived by calculating the simple sum of the Numerator vectors over the specified period (InpPeriod) divided by the simple sum of the Denominator vectors over the same period.
The RVI Signal Line is constructed as a 4-period symmetrically weighted moving average of the RVI Main Line:
- Signal Line = (RVI[0] + 2 * RVI[1] + 2 * RVI[2] + RVI[3]) / 6.0
Primary Trigger Conditions:
- Base Bullish Crossover: Occurs when the RVI Main Line crosses above the RVI Signal Line (MainBuffer[1] > SignalBuffer[1] and MainBuffer[2] <= SignalBuffer[2]).
- Base Bearish Crossover: Occurs when the RVI Main Line crosses below the RVI Signal Line (MainBuffer[1] < SignalBuffer[1] and MainBuffer[2] >= SignalBuffer[2]).
Detailed Operational Logic of the 17 Modular Filters
When enabled, each module functions as a strict directional gate:
1. RSI Dynamic Crossover Filter (Use_RSI_Cross_Filter)
- Calculation: Monitors standard Relative Strength Index values calculated with RSI_Length and RSI_Price_Source.
- Buy Condition: The RSI value must cross out of the oversold zone from below (RSI[1] > Oversold and RSI[2] <= Oversold).
- Sell Condition: The RSI value must cross out of the overbought zone from above (RSI[1] < Overbought and RSI[2] >= Overbought).
2. ADX Trend Strength Filter (Use_ADX_Filter)
- Calculation: Evaluates the Average Directional Movement Index across the designated ADX_Period.
- Directional Gate: Both Buy and Sell signals are filtered out unless the main ADX reading is equal to or greater than ADX_Min_Level, ensuring signals only generate when directional volatility exists.
3. Single Moving Average Trend Baseline Filter (Use_MA_Filter)
- Calculation: Evaluates a single Moving Average (SMA, EMA, SMMA, or LWMA) over MA_Period with applied MA_Shift.
- Buy Condition: The current bar's closing price must close strictly above the Moving Average value (Close[1] > MA[1]).
- Sell Condition: The current bar's closing price must close strictly below the Moving Average value (Close[1] < MA[1]).
4. Ichimoku Senkou Span B Baseline Filter (Use_Ichimoku_Filter)
- Calculation: Derives Senkou Span B from the standard Ichimoku Kinko Hyo algorithm over Ichimoku_SenkouB and Ichimoku_Kijun.
- Buy Condition: The bar closing price must be positioned above the Senkou Span B baseline.
- Sell Condition: The bar closing price must be positioned below the Senkou Span B baseline.
5. Long-Period RSI 75 Trend Filter (Use_RSI75_Filter)
- Calculation: Analyzes long-term momentum using a higher-period Relative Strength Index (RSI_Filter_Period, default 75).
- Buy Condition: The RSI 75 value must be above the 50.0 equilibrium baseline (RSI75[1] > 50.0).
- Sell Condition: The RSI 75 value must be below the 50.0 equilibrium baseline (RSI75[1] < 50.0).
6. Dual Moving Average Ribbon Filter (Use_DoubleMA_Filter)
- Calculation: Compares a fast moving average (MA_A) against a slow moving average (MA_B) configured with distinct periods, methods, applied prices, and shifts.
- Buy Condition: Fast MA value must be strictly higher than Slow MA value (MA_A[1] > MA_B[1]).
- Sell Condition: Fast MA value must be strictly lower than Slow MA value (MA_A[1] < MA_B[1]).
7. Awesome Oscillator Comprehensive Filter (Use_AO_Filter)
Offers three independent sub-modes calculated from standard median price momentum:
- Volume/Magnitude Threshold (Use_AO_Volume_Filter): Buy requires AO[1] >= AO_Buy_Min; Sell requires AO[1] <= AO_Sell_Max.
- Color/Bar Delta Direction (Use_AO_Color_Filter): Buy requires rising histogram (AO[1] > AO[2]); Sell requires declining histogram (AO[1] < AO[2]).
- Zero-Line Alignment (Use_AO_Zero_Filter): Buy requires rising histogram strictly above zero; Sell requires declining histogram strictly below zero.
8. Parabolic SAR Directional Filter (Use_SAR_Filter)
- Calculation: Evaluates Parabolic Stop and Reverse price dots based on SAR_Step acceleration and SAR_Maximum bounds.
- Buy Condition: Bar closing price must be strictly higher than the SAR dot (Close[1] > SAR[1]).
- Sell Condition: Bar closing price must be strictly lower than the SAR dot (Close[1] < SAR[1]).
9. Heiken Ashi Structural Candle Filter (Use_HeikenAshi_Filter)
- Calculation: Synthesizes modified Heiken Ashi Open and Close price series in real-time from the terminal price feed.
- Buy Condition: The synthetic Heiken Ashi candle must be bullish (HA_Close[1] > HA_Open[1]).
- Sell Condition: The synthetic Heiken Ashi candle must be bearish (HA_Close[1] < HA_Open[1]).
10. Commodity Channel Index Trend Filter (Use_CCI_Filter)
- Calculation: Computes baseline cyclical momentum over CCI_Period with specified applied price.
- Buy Condition: The CCI value must be positive (CCI[1] > 0.0).
- Sell Condition: The CCI value must be negative (CCI[1] < 0.0).
11. Commodity Channel Index Overbought/Oversold Filter (Use_CCI_OBOS_Filter)
- Calculation: Measures short-term exhaustion using CCI_OBOS_Period relative to upper and lower thresholds.
- Buy Condition: The oscillator must exceed the upper exhaustion threshold (CCI[1] > CCI_Overbought).
- Sell Condition: The oscillator must drop below the lower exhaustion threshold (CCI[1] < CCI_Oversold).
12. Macro RVI Trend Filter (Use_RVI_Filter)
- Calculation: Initializes a secondary Relative Vigor Index calculated across a broad horizon (RVI_Period, default 75).
- Buy Condition: Macro RVI main line must reside above the central zero line (RVI[1] > 0.0).
- Sell Condition: Macro RVI main line must reside below the central zero line (RVI[1] < 0.0).
13. Secondary RVI Signal Confluence Filter (Use_RVI_Signal_Filter)
- Calculation: Tracks a secondary RVI configuration (RVI_Signal_Period, default 20) with both main and signal lines.
- Buy Condition: Secondary main line must be positioned above its signal line (RVI_Main[1] > RVI_Sig[1]).
- Sell Condition: Secondary main line must be positioned below its signal line (RVI_Main[1] < RVI_Sig[1]).
14. MACD Histogram Dynamic Expansion Filter (Use_MACD_Filter)
- Calculation: Evaluates MACD histogram difference (Main Line minus Signal Line) across MACD_FastEMA, MACD_SlowEMA, and MACD_SignalSMA.
- Buy Condition: Histogram must be positive (Histogram[1] > 0.0).
- Sell Condition: Histogram must be negative (Histogram[1] < 0.0).
15. MACD Zero-Line Absolute Bias Filter (Use_MACD_Zero_Filter)
- Calculation: Analyzes the absolute position of the MACD Main Line relative to zero.
- Buy Condition: MACD Main Line must be above zero (MACD_Main[1] > 0.0).
- Sell Condition: MACD Main Line must be below zero (MACD_Main[1] < 0.0).
16. Dynamic Support and Resistance Zone Filter (Use_SR_Filter)
- Calculation: Identifies rolling price swing bounds by scanning the highest high and lowest low over the historical SR_Period window. Converts SR_Zone_Points into price units.
- Buy Condition: Validates whether the current bar's Low penetrates or tests within the calculated Support boundary zone.
- Sell Condition: Validates whether the current bar's High penetrates or tests within the calculated Resistance boundary zone.
17. Algorithmic Swing Fibonacci Retracement Filter (Use_Fib_Filter)
- Calculation: Implements peak and trough detection inspired by swing mechanics using ZigZag_Depth, ZigZag_Deviation, and ZigZag_Backstep parameters. Calculates dynamic Fibonacci retracement levels (Fib_Level_1 and Fib_Level_2) across the detected swing range.
- Confluence Condition: Evaluates whether the current bar candle range (High to Low) intersects the calculated Fibonacci retracement zone, confirming structural price alignment before permitting signal validation.
Comprehensive Input Parameter Documentation
General RVI Core Configuration:
- InpPeriod (Type: int, Default: 14, Unit: bars): Number of historical bars applied to calculate the main Relative Vigor Index formula.
- InpMainColor (Type: color, Default: clrBlue): Color assigned to the primary RVI line rendered in the subwindow.
- InpSignalColor (Type: color, Default: clrRed): Color assigned to the 4-period symmetrically weighted signal line.
- InpShowArrows (Type: bool, Default: true): Enables or disables graphical signal arrow objects on the main price chart.
- InpBuyColor (Type: color, Default: clrAqua): Color assigned to bullish wingdings signal arrows (code 233).
- InpSellColor (Type: color, Default: clrRed): Color assigned to bearish wingdings signal arrows (code 234).
- InpArrowSize (Type: int, Default: 2, Unit: pixels): Size scale of the graphical arrow objects drawn on the chart.
Alert and Notification Subsystem:
- InpEnableAlert (Type: bool, Default: true): Enables native on-screen pop-up dialogue alerts in the terminal window.
- InpEnableSound (Type: bool, Default: true): Activates localized audible audio playback when a verified signal occurs.
- InpSoundBuy (Type: string, Default: "alert.wav"): Wave sound filename for bullish signals located in the terminal Sounds directory.
- InpSoundSell (Type: string, Default: "alert.wav"): Wave sound filename for bearish signals located in the terminal Sounds directory.
- InpEnablePush (Type: bool, Default: true): Enables instant push notifications forwarded to iOS/Android MetaTrader apps via MetaQuotes ID.
- InpAlertClosedBar (Type: bool, Default: true): Enforces strict alert execution exclusively upon completed candle closure.
Filter Configuration Group:
- Mode_Group (Type: string, Default: "=== FILTER MODE ==="): Visual section separator in the MetaTrader input parameters tab.
RSI Dynamic Crossover Filter Settings:
- Use_RSI_Cross_Filter (Type: bool, Default: false): Activates RSI threshold recovery logic.
- RSI_Length (Type: int, Default: 14, Unit: bars): Calculation period for the Relative Strength Index.
- RSI_Price_Source (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Applied price source used in the RSI calculation.
- Oversold (Type: double, Default: 30.0, Unit: index level): Lower threshold representing the oversold boundary.
- Overbought (Type: double, Default: 70.0, Unit: index level): Upper threshold representing the overbought boundary.
ADX Trend Strength Filter Settings:
- Use_ADX_Filter (Type: bool, Default: false): Activates Average Directional Movement Index strength filtering.
- ADX_Period (Type: int, Default: 10, Unit: bars): Averaging period for the ADX technical indicator.
- ADX_Min_Level (Type: double, Default: 20.0, Unit: index level): Minimum required ADX baseline value to permit signal triggers.
Single Moving Average Baseline Settings:
- Use_MA_Filter (Type: bool, Default: false): Activates single Moving Average price position filtering.
- MA_Period (Type: int, Default: 50, Unit: bars): Averaging period for the trend Moving Average.
- MA_Method (Type: ENUM_MA_METHOD, Default: MODE_SMA): Smoothing method (Simple, Exponential, Smoothed, Linear Weighted).
- MA_Shift (Type: int, Default: 0, Unit: bars): Horizontal bar shift applied to the Moving Average line.
Ichimoku Senkou Span B Settings:
- Use_Ichimoku_Filter (Type: bool, Default: false): Activates Ichimoku Senkou Span B baseline comparison.
- Ichimoku_SenkouB (Type: int, Default: 52, Unit: bars): Calculation period for Senkou Span B line construction.
- Ichimoku_Kijun (Type: int, Default: 26, Unit: bars): Calculation period for Kijun-sen line construction.
RSI 75 Macro Trend Settings:
- Use_RSI75_Filter (Type: bool, Default: false): Activates long-term RSI midpoint trend validation.
- RSI_Filter_Period (Type: int, Default: 75, Unit: bars): Calculation period for the macro RSI indicator.
Double Moving Average Ribbon Settings:
- Use_DoubleMA_Filter (Type: bool, Default: false): Activates dual Moving Average alignment filtering.
- MA_A_Period (Type: int, Default: 30, Unit: bars): Averaging period for the faster Moving Average.
- MA_A_Method (Type: ENUM_MA_METHOD, Default: MODE_EMA): Smoothing calculation method applied to the fast Moving Average.
- MA_A_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Price constant used in the fast Moving Average.
- MA_A_Shift (Type: int, Default: 0, Unit: bars): Horizontal displacement for the fast Moving Average.
- MA_B_Period (Type: int, Default: 140, Unit: bars): Averaging period for the slower Moving Average.
- MA_B_Method (Type: ENUM_MA_METHOD, Default: MODE_EMA): Smoothing calculation method applied to the slow Moving Average.
- MA_B_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Price constant used in the slow Moving Average.
- MA_B_Shift (Type: int, Default: 0, Unit: bars): Horizontal displacement for the slow Moving Average.
Awesome Oscillator Module Settings:
- Use_AO_Filter (Type: bool, Default: false): Master toggle for the Awesome Oscillator evaluation module.
- Use_AO_Volume_Filter (Type: bool, Default: false): Enforces minimum amplitude requirements on AO histogram bars.
- AO_Buy_Min (Type: double, Default: 4.0, Unit: index value): Minimum positive AO threshold required for Buy confirmation.
- AO_Sell_Max (Type: double, Default: -4.0, Unit: index value): Maximum negative AO threshold required for Sell confirmation.
- Use_AO_Color_Filter (Type: bool, Default: false): Enforces directional color progression on AO histogram bars.
- Use_AO_Zero_Filter (Type: bool, Default: false): Enforces directional bar progression relative to the zero line.
Parabolic SAR Module Settings:
- Use_SAR_Filter (Type: bool, Default: false): Activates Parabolic Stop and Reverse price filtering.
- SAR_Step (Type: double, Default: 0.02, Unit: step ratio): Incremental acceleration factor for the Parabolic SAR algorithm.
- SAR_Maximum (Type: double, Default: 0.2, Unit: maximum ratio): Maximum ceiling acceleration factor for Parabolic SAR.
Heiken Ashi Trend Settings:
- Use_HeikenAshi_Filter (Type: bool, Default: false): Activates synthetic Heiken Ashi candle direction filtering.
CCI Trend Baseline Settings:
- Use_CCI_Filter (Type: bool, Default: false): Activates standard Commodity Channel Index zero-line filtering.
- CCI_Period (Type: int, Default: 50, Unit: bars): Averaging period for the trend CCI indicator.
- CCI_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Applied price source used in the trend CCI calculation.
CCI Overbought and Oversold Settings:
- Use_CCI_OBOS_Filter (Type: bool, Default: false): Activates extreme momentum breakout verification.
- CCI_OBOS_Period (Type: int, Default: 14, Unit: bars): Averaging period for the short-term CCI oscillator.
- CCI_OBOS_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Applied price source for short-term CCI.
- CCI_Overbought (Type: double, Default: 100.0, Unit: index level): Upper exhaustion threshold level.
- CCI_Oversold (Type: double, Default: -100.0, Unit: index level): Lower exhaustion threshold level.
RVI Macro Trend Settings:
- Use_RVI_Filter (Type: bool, Default: false): Activates secondary high-period RVI zero-line trend filtering.
- RVI_Period (Type: int, Default: 75, Unit: bars): Calculation period for the macro Relative Vigor Index.
Secondary RVI Signal Settings:
- Use_RVI_Signal_Filter (Type: bool, Default: false): Activates secondary RVI main versus signal line confluence.
- RVI_Signal_Period (Type: int, Default: 20, Unit: bars): Calculation period for the secondary RVI engine.
MACD Signal and Histogram Settings:
- Use_MACD_Filter (Type: bool, Default: false): Activates MACD histogram direction filtering.
- MACD_FastEMA (Type: int, Default: 12, Unit: bars): Period of the fast exponential moving average in the MACD core.
- MACD_SlowEMA (Type: int, Default: 26, Unit: bars): Period of the slow exponential moving average in the MACD core.
- MACD_SignalSMA (Type: int, Default: 9, Unit: bars): Smoothing period of the MACD signal line.
- MACD_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE): Price source applied across MACD computations.
MACD Zero-Line Filter Settings:
- Use_MACD_Zero_Filter (Type: bool, Default: false): Activates MACD Main Line absolute zero-level filtering.
Support and Resistance Filter Settings:
- Use_SR_Filter (Type: bool, Default: false): Activates dynamic rolling Support and Resistance band validation.
- SR_Period (Type: int, Default: 50, Unit: bars): Historical bar lookback used to identify highest high and lowest low levels.
- SR_Zone_Points (Type: double, Default: 80.0, Unit: points): Width of the reactive price zone measured in broker points.
Fibonacci Swing Retracement Settings:
- Use_Fib_Filter (Type: bool, Default: false): Activates algorithmic Fibonacci swing retracement zone detection.
- Fib_Level_1 (Type: double, Default: 0.382, Unit: ratio): Shallow boundary ratio of the Fibonacci retracement pocket.
- Fib_Level_2 (Type: double, Default: 0.618, Unit: ratio): Deep boundary ratio of the Fibonacci retracement pocket.
- ZigZag_Depth (Type: int, Default: 12, Unit: bars): Minimum bar lookback threshold between potential swing points.
- ZigZag_Deviation (Type: int, Default: 5, Unit: points): Minimum price deviation required to form a confirmed swing vertex.
- ZigZag_Backstep (Type: int, Default: 3, Unit: bars): Minimum historical bar interval required between consecutive swing pivots.
Operational Recommendations and Technical Setup
- Instrument Compatibility: Applicable to liquid financial instruments including Major and Minor Foreign Exchange currency pairs, Equity Indices, Precious Metals, and Energy contracts. Spread and liquidity characteristics should always be evaluated.
- Timeframe Suitability:
* Scalping Strategies: M1 and M5 timeframes with lower period settings (e.g., InpPeriod: 8-10, ADX filter engaged to isolate active sessions).
* Day Trading Strategies: M15 and H1 timeframes using balanced trend baselines (e.g., Single MA 50 or Double MA 30/140).
* Swing Trading Strategies: H4 and D1 timeframes with macro filters active (e.g., Ichimoku Senkou Span B, RSI 75, and Fibonacci Retracements).
- Account Architecture: Compatible with both Hedging and Netting execution accounts across Standard, ECN, and Raw Spread broker environments.
- Execution Latency: Because alerts and arrow calculations are executed on completed historical bars (Bar 1), ultra-low latency execution or dedicated VPS hosting is optional for manual trading workflows.
Strategy Confluence Archetypes
- Archetype 1: Trend-Following Momentum Model
* Core Settings: InpPeriod = 14
* Active Filters: Use_DoubleMA_Filter = true (MA 30 EMA vs MA 140 EMA), Use_ADX_Filter = true (ADX_Period = 14, Min_Level = 22.0), Use_MACD_Filter = true.
* Objective: Eliminates range-bound consolidation signals by requiring moving average ribbon alignment, active trend momentum, and MACD confirmation.
- Archetype 2: Cyclical Price Action Mean Reversion Model
* Core Settings: InpPeriod = 10
* Active Filters: Use_RSI_Cross_Filter = true (Oversold = 30, Overbought = 70), Use_SR_Filter = true (SR_Period = 50, SR_Zone_Points = 60), Use_HeikenAshi_Filter = true.
* Objective: Captures turning points by ensuring the RVI crossover occurs precisely when price tests horizontal support/resistance boundaries while RSI exits extreme territory.
- Archetype 3: Golden Pocket Structural Confluence Model
* Core Settings: InpPeriod = 14
* Active Filters: Use_Fib_Filter = true (Levels 0.382 to 0.618), Use_SAR_Filter = true, Use_CCI_Filter = true.
* Objective: Aligns cyclical oscillator momentum directly with structural swing retracements on higher timeframe charts.
Resource Allocation and Computational Optimization
The indicator architecture uses native MetaTrader 5 indicator handles (iRVI, iRSI, iADX, iMA, iIchimoku, iAO, iSAR, iCCI, iMACD) initialized during the OnInit execution cycle. Dynamic data arrays are assigned as time series and populated via optimized CopyBuffer calls only when their respective filter modules are toggled on.
Unused indicator handles remain unallocated, keeping memory footprints low. Graphical objects are uniquely indexed by epoch bar timestamp (e.g., RVI_BUY_timestamp) to avoid redundant chart operations. In the OnDeinit cycle, all graphical objects are cleared and active indicator handles are safely released from terminal memory.
Risk Disclaimer
Trading foreign exchange, indices, commodities, and other financial instruments carries a substantial level of risk and may not be suitable for all investors. Market volatility and leverage can work both for and against market participants, potentially leading to the loss of invested capital. Past performance, whether derived from manual trading analysis or simulated technical historical evaluation, is not indicative of future performance. This software is purely an analytical and informational technical analysis tool designed to assist traders in evaluating price momentum; it does not provide financial advice, automated trade execution, or guarantees of profitability. Users must thoroughly evaluate and test the indicator in a simulated demo trading environment to understand its operational behavior across various market conditions prior to deploying it on live trading accounts.
