William Percent Range WPR Signal Pro Multi Filters
- 지표
- 버전: 1.81
- 활성화: 5
WPR Signal Multi-Filter is a modular technical analysis indicator engineered for MetaTrader 5, designed to identify exhaustion turns, momentum continuations, and cyclical reversals using Williams' Percent Range (WPR) as its core trigger engine, coupled with 14 switchable algorithmic confirmation filters. Built for manual chart analysts who demand structured, rule-based execution without visual ambiguity, this software monitors momentum extremities, waits for confirmed directional recovery, and verifies multi-indicator confluence across trend, momentum, volatility, and price structure before generating non-repainting chart arrows and terminal alerts.
1. Overview and Core Analytical Purpose
Standard oscillators frequently mislead traders during persistent trends. When prices enter a sustained run, oscillators push into extreme bands and remain pinned while the trend continues, causing losses for traders attempting boundary touches. WPR Signal Multi-Filter solves this through an engineered two-stage state machine combined with multi-layer filtering. Williams' Percent Range functions as an operational radar: an extreme touch merely arms the system, while the actual signal requires a confirmed breakout back toward equilibrium. By embedding 14 switchable filter modules into native code, this indicator provides an all-in-one technical workspace.
2. Mathematical Formulation and Core Calculation Engine
The calculation engine operates on Williams' Percent Range (WPR) developed by Larry Williams, measuring the relative placement of the closing price against the high-low range of a designated historical period:
WPR = ((Highest High(N) - Close) / (Highest High(N) - Lowest Low(N))) * -100.0
Where Highest High(N) is the highest price across InpWPRPeriod, Lowest Low(N) is the lowest price across that period, and Close is the current bar close. The output oscillates strictly between 0.0 and -100.0. Readings from 0.0 to -20.0 reflect the premium exhaustion zone (buyer dominance), while -80.0 to -100.0 reflect the discount exhaustion zone (seller dominance). The -50.0 median level marks statistical equilibrium.
3. Two-Stage State Machine Operating Principle
To eliminate premature counter-trend entries, the indicator decouples exhaustion detection from breakout execution:
- Bullish Signal Sequence:
1. Arming Phase: On a completed candle, WPR drops to or below InpBuyTouchLevel (-80.0). The internal state arms (buy_armed = true), acknowledging discount exhaustion without plotting premature arrows.
2. Trigger Phase: On subsequent closed candles, prior bar WPR must be below InpBuyBreakLevel (-55.0) and current bar WPR must cross upward through or equal InpBuyBreakLevel, confirming buyers are pushing prices back toward equilibrium.
3. Confluence Verification: All enabled filter modules are evaluated simultaneously. Every active filter must return true; if any filter fails, the signal is discarded.
4. Execution: When all criteria align and MinBarsBetweenSignals is respected, BuySignalBuffer records the execution price (Low minus InpArrowDistance points), plotting arrow 233. The state resets (buy_armed = false) and alerts dispatch.
- Bearish Signal Sequence:
1. Arming Phase: WPR rises to or above InpSellTouchLevel (-20.0), setting the armed state (sell_armed = true) in premium exhaustion.
2. Trigger Phase: Prior bar WPR must be above InpSellBreakLevel (-45.0) and current bar WPR must cross downward through or equal InpSellBreakLevel, verifying active downward rejection.
3. Confluence Verification: Every enabled filter must confirm bearish conditions. Any conflicting reading voids the entry.
4. Execution: SellSignalBuffer records execution price (High plus InpArrowDistance points), plotting arrow 234. The state resets (sell_armed = false) and alerts dispatch.
4. Signal Execution Timing, Buffer Integrity, and Repaint Policy
Operational integrity and calculation transparency are paramount for systematic analysis:
- Closed-Bar Evaluation: Calculations execute on completed candlesticks. Signals, buffer values, and alerts trigger exclusively when a bar closes, ensuring prices and indicator buffers are permanent.
- Non-Repainting Guarantee: Signals plotted in BuySignalBuffer (Buffer 0) and SellSignalBuffer (Buffer 1) never recalculate, shift bars, or disappear once the candle closes. Confirmed arrows remain static in chart history.
- Structural Swing Filters: When the Fibonacci Filter (Use_Fib_Filter) is enabled, swing points are detected via ZigZag geometry (Depth: 12, Deviation: 5, Backstep: 3). Confirmed historical pivots remain fixed once established beyond the backstep window.
5. Technical Overview of the 14 Integrated Filter Modules
WPR Signal Multi-Filter incorporates 14 independent analytical filters that can be activated in any combination:
- 5.1. RSI Cross Filter (Use_RSI_Cross_Filter): 14-period RSI on close. Buy: RSI > 30.0 and prior RSI <= 30.0. Sell: RSI < 70.0 and prior RSI >= 70.0.
- 5.2. ADX Trend Strength Filter (Use_ADX_Filter): 10-period ADX. Buy/Sell: ADX >= 20.0, suppressing low-volatility chop.
- 5.3. Single Moving Average Filter (Use_MA_Filter): 50 SMA. Buy: Close > MA. Sell: Close < MA.
- 5.4. Ichimoku Senkou Span B Filter (Use_Ichimoku_Filter): 52-period Span B. Buy: Close > Span B. Sell: Close < Span B.
- 5.5. RSI 75 Macro Filter (Use_RSI75_Filter): 75-period RSI benchmark. Buy: RSI(75) > 50.0. Sell: RSI(75) < 50.0.
- 5.6. Double Moving Average Filter (Use_DoubleMA_Filter): 30 EMA vs 140 EMA. Buy: Fast MA > Slow MA. Sell: Fast MA < Slow MA.
- 5.7. Awesome Oscillator Filter (Use_AO_Filter): Volume: AO >= 4.0 (Buy), AO <= -4.0 (Sell). Color: AO rising (Buy), falling (Sell). Zero: AO > 0 rising (Buy), AO < 0 falling (Sell).
- 5.8. Parabolic SAR Filter (Use_SAR_Filter): Step 0.02, Max 0.2. Buy: Close > SAR. Sell: Close < SAR.
- 5.9. Heiken Ashi Filter (Use_HeikenAshi_Filter): Synthetic HA bodies. Buy: HA Close > HA Open. Sell: HA Close < HA Open.
- 5.10. CCI Trend Filter (Use_CCI_Filter): 50-period CCI. Buy: CCI > 0.0. Sell: CCI < 0.0.
- 5.11. CCI OB/OS Filter (Use_CCI_OBOS_Filter): 14-period CCI. Buy: CCI > 100.0. Sell: CCI < -100.0.
- 5.12. RVI Trend Filter (Use_RVI_Filter): 75-period RVI. Buy: RVI Main > 0.0. Sell: RVI Main < 0.0.
- 5.13. RVI Signal Filter (Use_RVI_Signal_Filter): 20-period RVI. Buy: RVI Main > Signal. Sell: RVI Main < Signal.
- 5.14. MACD Signal Histogram Filter (Use_MACD_Filter): 12, 26, 9 MACD. Buy: Histogram > 0.0. Sell: Histogram < 0.0.
- 5.15. MACD Zero Filter (Use_MACD_Zero_Filter): Buy: MACD Main > 0.0. Sell: MACD Main < 0.0.
- 5.16. Support & Resistance Filter (Use_SR_Filter): 50-bar rolling range. Buy: Low within 80 points of support. Sell: High within 80 points of resistance.
- 5.17. Fibonacci Filter (Use_Fib_Filter): ZigZag (12, 5, 3). Rule: Candle range intersects the 0.382-0.618 golden ratio zone.
6. Complete Input Parameters Directory
Every setting declared in the source code is documented below with its default value, type, and function:
- InpWPRPeriod (14, int): Lookback period in bars for WPR calculation.
- InpBuyTouchLevel (-80.0, double): Oversold threshold to arm bullish state.
- InpBuyBreakLevel (-55.0, double): Recovery threshold to trigger Buy signals.
- InpSellTouchLevel (-20.0, double): Overbought threshold to arm bearish state.
- InpSellBreakLevel (-45.0, double): Rejection threshold to trigger Sell signals.
- InpArrowDistance (25, int): Vertical distance in points between bar and arrow.
- InpBuyColor (clrAqua, color): Display color for Buy signal arrows.
- InpSellColor (clrRed, color): Display color for Sell signal arrows.
- InpArrowWidth (2, int): Visual thickness of plotted arrow glyphs.
- Arrow_Group ("=== ARROW ===", string): Visual separator for arrow parameters.
- MinBarsBetweenSignals (1, int): Minimum bars between consecutive signals.
- Alert_Group ("=== ALERT & NOTIF ===", string): Visual separator for alert settings.
- Enable_Alert (true, bool): Enables terminal pop-up alert dialogs.
- Enable_Sound (true, bool): Enables audible sound alert notifications.
- Enable_Notification (true, bool): Enables push notifications to mobile MetaTrader.
- Alert_SoundFile ("alert.wav", string): Audio file name in terminal Sounds folder.
- Mode_Group ("=== FILTER MODE ===", string): Header for secondary filter modules.
- RSI_Group ("=== RSI CROSS FILTER ===", string): Header for RSI crossover settings.
- Use_RSI_Cross_Filter (false, bool): Toggles the fast RSI crossover confirmation.
- RSI_Length (14, int): Lookback period for fast RSI calculation.
- RSI_Price_Source (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for RSI.
- Oversold (30.0, double): Lower boundary for RSI rebound confirmation.
- Overbought (70.0, double): Upper boundary for RSI rollover confirmation.
- ADX_Group ("=== ADX FILTER ===", string): Header for ADX filter settings.
- Use_ADX_Filter (false, bool): Toggles the ADX trend velocity filter.
- ADX_Period (10, int): Calculation period for ADX indicator.
- ADX_Min_Level (20.0, double): Minimum ADX level required to permit signals.
- MA_Group ("=== SINGLE MA FILTER ===", string): Header for Single MA filter.
- Use_MA_Filter (false, bool): Toggles baseline moving average directional filtering.
- MA_Period (50, int): Lookback period for the moving average.
- MA_Method (MODE_SMA, ENUM_MA_METHOD): Averaging method (SMA, EMA, SMMA, LWMA).
- MA_Shift (0, int): Horizontal shift applied to the moving average.
- Ichimoku_Group ("=== ICHIMOKU SENKOU SPAN B FILTER ===", string): Header for Ichimoku.
- Use_Ichimoku_Filter (false, bool): Toggles Senkou Span B baseline filtering.
- Ichimoku_SenkouB (52, int): Lookback period for Senkou Span B.
- Ichimoku_Kijun (26, int): Kijun-sen period configuration parameter.
- RSI75_Group ("=== RSI 75 FILTER ===", string): Header for macro RSI filter.
- Use_RSI75_Filter (false, bool): Toggles 75-period RSI momentum filtering.
- RSI_Filter_Period (75, int): Calculation period for macro RSI.
- DoubleMA_Group ("=== DOUBLE MA FILTER ===", string): Header for Double MA filter.
- Use_DoubleMA_Filter (false, bool): Toggles dual MA trend alignment filtering.
- MA_A_Period (30, int): Lookback period for Fast Moving Average A.
- MA_A_Method (MODE_EMA, ENUM_MA_METHOD): Smoothing method for MA A.
- MA_A_Applied (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for MA A.
- MA_A_Shift (0, int): Horizontal shift for MA A.
- MA_B_Period (140, int): Lookback period for Slow Moving Average B.
- MA_B_Method (MODE_EMA, ENUM_MA_METHOD): Smoothing method for MA B.
- MA_B_Applied (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for MA B.
- MA_B_Shift (0, int): Horizontal shift for MA B.
- AO_Group ("=== AWESOME OSCILLATOR FILTER ===", string): Header for AO filter.
- Use_AO_Filter (false, bool): Master toggle for Awesome Oscillator filter.
- Use_AO_Volume_Filter (false, bool): Enforces minimum AO magnitude thresholds.
- AO_Buy_Min (4.0, double): Minimum positive AO value required for Buy signals.
- AO_Sell_Max (-4.0, double): Maximum negative AO value required for Sell signals.
- Use_AO_Color_Filter (false, bool): Requires rising histogram for Buy, falling for Sell.
- Use_AO_Zero_Filter (false, bool): Requires positive rising for Buy, negative falling for Sell.
- SAR_Group ("=== PARABOLIC SAR FILTER ===", string): Header for Parabolic SAR filter.
- Use_SAR_Filter (false, bool): Toggles Parabolic SAR trailing filter.
- SAR_Step (0.02, double): Incremental acceleration step for SAR.
- SAR_Maximum (0.2, double): Maximum acceleration ceiling for SAR.
- HA_Group ("=== HEIKEN ASHI FILTER ===", string): Header for Heiken Ashi filter.
- Use_HeikenAshi_Filter (false, bool): Toggles synthetic Heiken Ashi candle filter.
- CCI_Group ("=== CCI TREND FILTER ===", string): Header for CCI trend filter.
- Use_CCI_Filter (false, bool): Toggles 50-period CCI zero-line filter.
- CCI_Period (50, int): Period for intermediate CCI calculation.
- CCI_Applied (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for intermediate CCI.
- CCI_OBOS_Group ("=== CCI OB & OS FILTER ===", string): Header for fast CCI OB/OS filter.
- Use_CCI_OBOS_Filter (false, bool): Toggles 14-period CCI breakout extremity filter.
- CCI_OBOS_Period (14, int): Period for fast CCI calculation.
- CCI_OBOS_Applied (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for fast CCI.
- CCI_Overbought (100.0, double): Upper threshold required for Buy validation.
- CCI_Oversold (-100.0, double): Lower threshold required for Sell validation.
- RVI_Group ("=== RVI TREND FILTER ===", string): Header for RVI trend filter.
- Use_RVI_Filter (false, bool): Toggles 75-period RVI zero-line filter.
- RVI_Period (75, int): Calculation period for macro RVI.
- RVI_Signal_Group ("=== RVI SIGNAL FILTER ===", string): Header for RVI signal filter.
- Use_RVI_Signal_Filter (false, bool): Toggles RVI main and signal crossover filter.
- RVI_Signal_Period (20, int): Calculation period for fast RVI signal line.
- MACD_Group ("=== MACD SIGNAL FILTER ===", string): Header for MACD histogram filter.
- Use_MACD_Filter (false, bool): Toggles MACD histogram directional filter.
- MACD_FastEMA (12, int): Fast EMA period for MACD.
- MACD_SlowEMA (26, int): Slow EMA period for MACD.
- MACD_SignalSMA (9, int): Signal line SMA period for MACD.
- MACD_Applied (PRICE_CLOSE, ENUM_APPLIED_PRICE): Applied price for MACD calculations.
- MACD_Zero_Group ("=== MACD LEV 0 FILTER ===", string): Header for MACD zero filter.
- Use_MACD_Zero_Filter (false, bool): Toggles MACD zero-axis filter.
- SR_Group ("=== SUPPORT & RESISTANCE FILTER ===", string): Header for S&R filter.
- Use_SR_Filter (false, bool): Toggles rolling Support & Resistance boundary filter.
- SR_Period (50, int): Lookback bar count for horizontal extremes.
- SR_Zone_Points (80, double): Proximity tolerance in points around S&R.
- Fib_Group ("=== FIBONACCI FILTER ===", string): Header for Fibonacci filter.
- Use_Fib_Filter (false, bool): Toggles Fibonacci retracement corridor filter.
- Fib_Level_1 (0.382, double): Primary golden ratio retracement boundary.
- Fib_Level_2 (0.618, double): Secondary golden ratio retracement boundary.
- ZigZag_Depth (12, int): Lookback bar depth evaluated to detect swing extremities.
- ZigZag_Deviation (5, int): Price deviation required for swing pivot.
- ZigZag_Backstep (3, int): Minimum bar spacing between swing pivots.
7. Operational Chart Setups and Trading Frameworks
Traders can combine specific filters to construct dedicated templates tailored to their market style:
- 7.1. Trend Pullback Framework (Day / Swing Trading on M15, H1, H4):
Configured for trending FX pairs, commodities, and indices. Settings: InpWPRPeriod: 14, InpBuyTouchLevel: -80.0, InpBuyBreakLevel: -50.0, InpSellTouchLevel: -20.0, InpSellBreakLevel: -50.0. Filters: Use_MA_Filter: true (50 SMA), Use_ADX_Filter: true (14 ADX, Min: 22.0), Use_DoubleMA_Filter: true (30 EMA, 140 EMA). Concept: Moving averages define trend orientation while ADX confirms directional momentum. WPR waits for a pullback before signaling trend resumption.
- 7.2. Mean Reversion and Range Framework (Range Trading on M5, M15):
Designed for sideways consolidations and channels. Settings: InpWPRPeriod: 21, InpBuyTouchLevel: -85.0, InpBuyBreakLevel: -65.0, InpSellTouchLevel: -15.0, InpSellBreakLevel: -35.0. Filters: Use_SR_Filter: true (50 bars, 80 points), Use_AO_Filter: true (Color filter enabled). Concept: Requires deeper exhaustion touches before arming. Signals validate when price tests horizontal boundaries and momentum reverses.
- 7.3. Dynamic Momentum Scalping Framework (M1, M5 Execution):
Designed for intraday execution during peak sessions. Settings: InpWPRPeriod: 10, InpBuyTouchLevel: -80.0, InpBuyBreakLevel: -55.0, InpSellTouchLevel: -20.0, InpSellBreakLevel: -45.0. Filters: Use_HeikenAshi_Filter: true, Use_MACD_Filter: true (12, 26, 9), Use_SAR_Filter: true (Step: 0.02, Max: 0.2). Concept: Responsive execution on short-term cyclical turns while Heiken Ashi and MACD histogram expansion filter market noise.
8. Computational Architecture and Terminal Performance
WPR Signal Multi-Filter is optimized for lightweight execution across multi-chart workspaces:
- Incremental Bar Calculation: Evaluates only newly arrived or completed bars via an incremental counter (int start = prev_calculated - 1), preventing unnecessary historical recomputations.
- On-Demand Handle Allocation: Secondary indicator handles are created in OnInit exclusively when their respective switches are active. Disabled filters consume zero CPU overhead.
- Strict Resource Cleanup: OnDeinit systematically releases all assigned indicator handles using IndicatorRelease, preventing memory leaks during timeframe or symbol changes.
9. Operational Specifications and Recommendations
- Supported Instruments: Compatible with all MetaTrader 5 assets: Forex pairs, Spot Metals (XAUUSD, XAGUSD), Crude Oil, Equity Indices, and Cryptocurrencies.
- Supported Timeframes: Applicable from M1 to Daily. Lower timeframes (M1-M15) favor scalping, while higher timeframes (H1, H4, D1) excel with structural swing templates.
- Account Compatibility: Operates seamlessly on Netting and Hedging accounts with Standard, Raw Spread, or ECN broker models.
- Multi-Timeframe Workflow: Identify macro trend structure on higher timeframes (H4/Daily) and use the indicator on an operational timeframe (M15/H1) to execute in alignment with the broader trend.
10. Frequently Asked Questions
- Does this indicator repaint historical signals?
No. Signals evaluated on completed bars remain fixed once the candle closes. Plotted arrows in Buffer 0 and Buffer 1 never recalculate, shift, or disappear upon subsequent ticks or chart refreshes.
- Why do signals appear less frequently when multiple filters are active?
The filter engine operates under strict AND logic. Every activated filter must validate simultaneously. Using many filters concurrently creates a selective setup that eliminates marginal market conditions.
- How can I adjust signal frequency for day trading?
To increase signal frequency, reduce InpWPRPeriod (e.g. from 14 to 10 or 8), narrow the gap between Touch and Break levels (e.g. Touch -75, Break -60), and disable macro filters such as RSI 75 or Senkou Span B.
- How do I enable mobile notifications?
Set Enable_Notification to true in indicator inputs. In MetaTrader 5, navigate to Tools -> Options -> Notifications, enable Push Notifications, and enter your MetaQuotes ID from your mobile app.
11. Official Risk Disclaimer
Trading foreign exchange, commodities, indices, and financial derivatives carries significant risk and may not be suitable for all investors. High leverage can work against you as well as for you. Past performance or historical visual signals do not represent or guarantee future results. This software is an analytical and operational tool designed to assist manual traders with technical analysis; it does not provide investment advice or guarantee profits. Always test the indicator on a demo account under varying market conditions before considering live trading deployment.
