WPR Williams Percent Range Momentum Multi Filter
- 지표
- 버전: 1.0
- 활성화: 5
WPR Williams Percent Range Momentum Multi Filter
Overview
WPR Signal MultiFilter is a technical analysis indicator for MetaTrader 4 designed to identify potential momentum shifts and trend continuations using the Williams Percent Range (%R) oscillator combined with a modular 15-filter confirmation architecture and dynamic Average True Range (ATR) target projections. The software plots directional arrows directly on the main price chart and calculates automated Entry, Stop Loss (SL), and three Take Profit (TP) risk-to-reward reference levels for the most recent validated signal. This tool functions strictly as an analytical and visual decision-support utility and does not execute automated trades. It provides discretionary traders with structured entry triggers, objective volatility-adjusted risk boundaries, and real-time multi-channel notifications across multiple asset classes.
Operating Principle and Signal Logic
The indicator evaluates market momentum through a two-stage state validation mechanism based exclusively on closed candlestick data (Bar 1 and earlier):
- Bullish Setup (Buy Signal): The system first monitors the Williams Percent Range oscillator for a dip into or below the configured oversold threshold (InpBuyTouchLevel) to arm a potential bullish setup. Once armed, the indicator waits for momentum recovery and plots an upward Buy arrow below the signal candle when the %R line crosses upward across the bullish breakout trigger level (InpBuyBreakLevel) from below, provided all enabled confirmation filters validate the directional bias and the minimum bar spacing requirement is satisfied.
- Bearish Setup (Sell Signal): The system monitors the %R oscillator for a rise into or above the configured overbought threshold (InpSellTouchLevel) to arm a potential bearish setup. Once armed, the indicator waits for downward momentum shift and plots a downward Sell arrow above the signal candle when the %R line crosses downward across the bearish breakout trigger level (InpSellBreakLevel) from above, subject to validation by all active confirmation filters and bar interval rules.
- Two-Stage State Reset Mechanism: After a signal arrow is successfully generated and plotted on the chart, the internal arming state resets automatically. The oscillator must revisit the respective oversold or overbought extreme zone before a subsequent signal in the same direction can be armed again, preventing repetitive consecutive arrows during prolonged sideways drift.
- Non-Repainting Behavior: All signal evaluations are performed exclusively on completed, closed candlesticks (shift >= 1). Once a candle closes and a Buy or Sell arrow is plotted on the chart, the historical signal does not disappear, shift, or recalculate on subsequent incoming ticks or chart refreshes. Note that if the optional Fibonacci retracement filter is enabled, its internal swing detection relies on historical pivot lookbacks.
- Dynamic Risk and Target Projection: Upon generating a valid signal, the indicator samples the current ATR value multiplied by a user-defined risk factor to establish the Stop Loss distance (1R). Three progressive Take Profit levels corresponding to 1:1 (TP1), 1:2 (TP2), and 1:3 (TP3) risk-to-reward ratios are automatically drawn on the chart for the latest active signal only, keeping the workspace clean of historical line clutter while offering structured scaling-out targets.
Architecture of the 15-Filter Confirmation Suite
To adapt to diverse market regimes—ranging from trending breakouts to mean-reverting pullbacks—the indicator integrates 15 independent technical filter modules. All enabled filters operate under strict logical conjunction (AND logic), meaning every active module must agree with the signal direction before an arrow is plotted:
- Momentum and Oscillator Filters (Filters 1, 5, 7, 10, 11, 12, 13): Includes RSI threshold crossovers, long-period RSI macro polarity around the 50 midpoint, Awesome Oscillator amplitude/color/zero-line rules, dual CCI trend and overbought/oversold momentum checks, Relative Vigor Index (RVI) zero-line and signal-line crossovers, and MACD histogram/zero-line alignment.
- Trend and Regime Filters (Filters 2, 3, 4, 6, 8, 9, 15): Incorporates ADX minimum trend strength filtering to avoid low-volatility consolidation, Single Moving Average price-location filtering, Ichimoku Senkou Span B macro baseline validation, Double Moving Average fast/slow alignment, Parabolic SAR directional tracking, smoothed Heiken Ashi candle polarity, and an ATR-based Supertrend regime filter.
- Price Structure Filters (Filter 14): Evaluates proximity to recent swing Support and Resistance boundaries within a configurable point tolerance buffer, alongside automated swing Fibonacci retracement zone validation between user-defined retracement ratios.
Key Technical Features
- Two-Stage %R Momentum Engine: Separates oversold/overbought arming zones from breakout confirmation triggers to reduce premature counter-trend entries during extended market moves.
- Modular 15-Filter Confirmation Suite: Enables traders to combine up to 15 independent technical filters across trend, volatility, momentum, and market structure categories without cluttering the chart with 15 separate sub-window indicators.
- Automated ATR Target Visualization: Draws clean, non-intrusive Entry, SL, TP1 (1R), TP2 (2R), and TP3 (3R) horizontal segments with real-time price labels for the most recent signal only.
- Signal Frequency Control: Includes a minimum bar cooldown parameter (MinBarsBetweenSignals) to prevent clustered signals during volatile whip-saw sessions.
- Multi-Channel Alert System: Supports MetaTrader terminal pop-up alerts, customizable WAV audio notifications, and mobile push notifications containing full Entry, SL, and TP coordinates.
- Optimized Memory and CPU Footprint: Calculates internal series buffers incrementally on new bar formations and cleanly removes all graphical chart objects upon indicator removal or timeframe switching.
Operation and Setup Recommendations
- Supported Instruments: Suitable for major and minor Forex currency pairs (such as EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD), precious metals (XAUUSD, XAGUSD), major equity indices, and liquid commodities. Users should evaluate instrument tick size, spread, and average volatility characteristics when configuring ATR multipliers and point-based zone filters.
- Recommended Timeframes: Compatible with all standard MetaTrader 4 timeframes from M1 to MN1. M15, M30, and H1 are well-suited for intraday momentum trading, M5 can be used during high-liquidity sessions (London and New York overlap) with stricter trend filters enabled, and H4 or D1 are appropriate for multi-day swing analysis.
- Broker Environment: Works identically on both Hedging and Netting account types. Standard ECN or raw-spread accounts are recommended so that calculated Entry, SL, and TP price levels align closely with actual broker bid/ask execution prices.
- Step-by-Step Configuration Workflow: By default, all 15 confirmation filters are set to false so the user can inspect raw %R breakout behavior on historical price action first. Traders should start by tuning the core %R thresholds and ATR risk multiplier for their chosen symbol, then selectively enable 1 to 3 complementary filters (for example, one trend regime filter such as Double MA or Supertrend combined with one strength filter such as ADX) to avoid over-filtering.
- Resource Usage Note: Activating multiple complex filters (such as Supertrend, Fibonacci ZigZag, and Support/Resistance lookbacks) across numerous open charts simultaneously increases CPU utilization during initial chart loading. Close unused charts to maintain optimal terminal responsiveness.
Graphical Interface and Alert Specifications
- Chart Arrows: By default, upward Aqua arrows (Wingdings code 233) plotted below candle lows indicate confirmed Buy signals, while downward Red arrows (Wingdings code 234) plotted above candle highs indicate confirmed Sell signals. Arrow distance and thickness are fully adjustable.
- Target Level Lines: When enabled, a solid Gold horizontal line marks the signal candle close (Entry), a dashed Red line marks Stop Loss (SL), a dashed Lime Green line marks TP1 (1R), a dashed Medium Sea Green line marks TP2 (2R), and a dashed Dodger Blue line marks TP3 (3R). All lines are set as non-selectable background objects so they do not interfere with manual chart drawing tools.
- Alert Formats: When triggered on a newly closed bar, terminal pop-up alerts, audio files, and mobile MetaQuotes ID push notifications transmit a structured text message containing the instrument symbol, active timeframe, signal direction (BUY or SELL), entry price, Stop Loss price, and exact TP1, TP2, and TP3 price levels.
Input Parameters Documentation
WPR Strategy Settings (Entry Logic)
- InpSecWPR (Default: "=== WPR STRATEGY SETTINGS (ENTRY LOGIC) ===") -> Visual section separator header in the Inputs tab.
- InpWPRPeriod (Default: 14) -> Number of historical bars used to calculate the Williams Percent Range (%R) oscillator.
- InpBuyTouchLevel (Default: -80.0) -> Oversold threshold level (scale -100 to 0) that arms the indicator to look for a bullish breakout.
- InpBuyBreakLevel (Default: -55.0) -> Bullish trigger level that %R must cross upward to confirm a Buy setup after being armed.
- InpSellTouchLevel (Default: -20.0) -> Overbought threshold level (scale -100 to 0) that arms the indicator to look for a bearish breakout.
- InpSellBreakLevel (Default: -45.0) -> Bearish trigger level that %R must cross downward to confirm a Sell setup after being armed.
- InpArrowDistance (Default: 25) -> Vertical offset distance in broker points between the signal candle high/low and the plotted arrow.
Arrow and Display Settings
- InpSecVisual (Default: "=== ARROW & DISPLAY SETTINGS ===") -> Visual section separator header in the Inputs tab.
- InpBuyColor (Default: clrAqua) -> Color of the upward Buy signal arrow plotted below bullish signal bars.
- InpSellColor (Default: clrRed) -> Color of the downward Sell signal arrow plotted above bearish signal bars.
- InpArrowWidth (Default: 2) -> Pixel width size of the Buy and Sell signal arrows on the chart.
- MinBarsBetweenSignals (Default: 1) -> Minimum number of closed bars required between two consecutive valid signals.
ATR and Target Levels (SL/TP)
- InpSecATR (Default: "=== [C] ATR & TARGET LEVELS (SL/TP) ===") -> Visual section separator header in the Inputs tab.
- InpShowLines (Default: true) -> Enables or disables drawing Entry, SL, and TP horizontal reference lines on the chart.
- InpATRPeriod (Default: 7) -> Lookback period in bars for the Average True Range (ATR) volatility calculation.
- InpATRMultiplier (Default: 1.5) -> Multiplier applied to the ATR value to determine the Stop Loss distance (1R risk unit).
- InpLineRightBars (Default: 1) -> Number of bars to extend the target lines to the right of the current active candle (bar 0).
- InpFontSize (Default: 8) -> Font size in points for the right-side price and risk-reward text labels.
- InpEntryColor (Default: clrGold) -> Line and label color for the signal Entry price level.
- InpSLColor (Default: clrRed) -> Line and label color for the Stop Loss (SL) level.
- InpTP1Color (Default: clrLimeGreen) -> Line and label color for the first Take Profit level at 1:1 risk-reward.
- InpTP2Color (Default: clrMediumSeaGreen) -> Line and label color for the second Take Profit level at 1:2 risk-reward.
- InpTP3Color (Default: clrDodgerBlue) -> Line and label color for the third Take Profit level at 1:3 risk-reward.
- InpTargetLineStyle (Default: STYLE_DASH) -> Line drawing style (solid, dash, dot, dashdot) for SL and TP levels.
- InpLineWidth (Default: 1) -> Line thickness in pixels for Entry, SL, and TP horizontal segments.
Alert and Notification Settings
- InpSecAlert (Default: "=== ALERT & NOTIFICATION SETTINGS ===") -> Visual section separator header in the Inputs tab.
- Enable_Alert (Default: true) -> Enables or disables standard MetaTrader pop-up alert windows upon signal confirmation.
- Enable_Sound (Default: true) -> Enables or disables audio alert playback when a signal occurs.
- Enable_Notification (Default: true) -> Enables or disables push notifications sent to the mobile MetaTrader app via MetaQuotes ID.
- Alert_SoundFile (Default: "alert.wav") -> Filename of the WAV audio file located in the terminal Sounds directory.
Filter 1: RSI Cross Filter
- InpFilter1 (Default: "=== 1. RSI CROSS FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_RSI_Cross_Filter (Default: false) -> Enables or disables Relative Strength Index (RSI) threshold crossover validation.
- RSI_Length (Default: 14) -> Calculation period in bars for the RSI crossover filter.
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied candle price type (Close, Open, High, Low, Median, Typical, Weighted) used for RSI computation.
- RSI_Oversold (Default: 30.0) -> Oversold level that RSI must cross above on the signal bar to permit Buy signals.
- RSI_Overbought (Default: 70.0) -> Overbought level that RSI must cross below on the signal bar to permit Sell signals.
Filter 2: ADX Trend Strength Filter
- InpFilter2 (Default: "=== 2. ADX FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_ADX_Filter (Default: false) -> Enables or disables Average Directional Index (ADX) minimum trend strength filtering.
- ADX_Period (Default: 10) -> Calculation period in bars for the ADX indicator.
- ADX_Min_Level (Default: 20.0) -> Minimum ADX main line value required to confirm sufficient market directional momentum.
Filter 3: Single Moving Average Filter
- InpFilter3 (Default: "=== 3. SINGLE MA FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_MA_Filter (Default: false) -> Enables or disables price position filtering relative to a single Moving Average.
- MA_Period (Default: 50) -> Averaging period in bars for the trend Moving Average.
- MA_Method (Default: MODE_SMA) -> Smoothing method (SMA, EMA, SMMA, LWMA) for the Moving Average.
- MA_Shift (Default: 0) -> Horizontal bar shift applied to the Moving Average calculation.
Filter 4: Ichimoku Senkou Span B Filter
- InpFilter4 (Default: "=== 4. ICHIMOKU SENKOU SPAN B FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_Ichimoku_Filter (Default: false) -> Enables or disables directional filtering using the Ichimoku Senkou Span B baseline.
- Ichimoku_Tenkan (Default: 9) -> Tenkan-sen conversion line period in bars.
- Ichimoku_Kijun (Default: 26) -> Kijun-sen base line period in bars.
- Ichimoku_SenkouB (Default: 52) -> Senkou Span B leading span period in bars used as dynamic macro trend boundary.
Filter 5: Long-Period RSI Trend Filter
- InpFilter5 (Default: "=== 5. RSI 75 FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_RSI75_Filter (Default: false) -> Enables or disables macro momentum filtering around the RSI 50.0 midpoint level.
- RSI_Filter_Period (Default: 75) -> Lookback period in bars for the long-period macro trend RSI.
Filter 6: Double Moving Average Crossover Filter
- InpFilter6 (Default: "=== 6. DOUBLE MA FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_DoubleMA_Filter (Default: false) -> Enables or disables fast-versus-slow Moving Average trend alignment filtering.
- MA_A_Period (Default: 30) -> Period in bars for the fast Moving Average (MA A).
- MA_A_Method (Default: MODE_EMA) -> Smoothing method for the fast Moving Average.
- MA_A_Applied (Default: PRICE_CLOSE) -> Applied price source for the fast Moving Average.
- MA_A_Shift (Default: 0) -> Horizontal bar shift for the fast Moving Average.
- MA_B_Period (Default: 140) -> Period in bars for the slow Moving Average (MA B).
- MA_B_Method (Default: MODE_EMA) -> Smoothing method for the slow Moving Average.
- MA_B_Applied (Default: PRICE_CLOSE) -> Applied price source for the slow Moving Average.
- MA_B_Shift (Default: 0) -> Horizontal bar shift for the slow Moving Average.
Filter 7: Awesome Oscillator (AO) Filter
- InpFilter7 (Default: "=== 7. AWESOME OSCILLATOR FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_AO_Filter (Default: false) -> Master switch to enable or disable Awesome Oscillator confirmation rules.
- Use_AO_Volume_Filter (Default: false) -> Enables minimum amplitude threshold validation on AO histogram bars.
- AO_Buy_Min (Default: 4.0) -> Minimum positive AO value required for Buy signals when amplitude threshold is active.
- AO_Sell_Max (Default: -4.0) -> Maximum negative AO value required for Sell signals when amplitude threshold is active.
- Use_AO_Color_Filter (Default: false) -> Requires rising AO histogram bars for Buy and falling bars for Sell.
- Use_AO_Zero_Filter (Default: false) -> Requires AO to be above zero and rising for Buy, or below zero and falling for Sell.
Filter 8: Parabolic SAR Filter
- InpFilter8 (Default: "=== 8. PARABOLIC SAR FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_SAR_Filter (Default: false) -> Enables or disables Parabolic Stop and Reverse (SAR) directional filtering.
- SAR_Step (Default: 0.02) -> Acceleration factor step increment for Parabolic SAR.
- SAR_Maximum (Default: 0.2) -> Maximum acceleration factor limit for Parabolic SAR.
Filter 9: Heiken Ashi Candle Filter
- InpFilter9 (Default: "=== 9. HEIKEN ASHI FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_HeikenAshi_Filter (Default: false) -> Enables or disables smoothed Heiken Ashi candle polarity confirmation (bullish close above open for Buy, bearish close below open for Sell).
Filter 10: CCI Zero-Line Trend Filter
- InpFilter10 (Default: "=== 10. CCI TREND FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_CCI_Filter (Default: false) -> Enables or disables Commodity Channel Index (CCI) zero-line polarity filtering.
- CCI_Period (Default: 50) -> Calculation period in bars for the trend CCI filter.
- CCI_Applied (Default: PRICE_CLOSE) -> Applied price source for the trend CCI calculation.
Filter 11: CCI Overbought and Oversold Filter
- InpFilter11 (Default: "=== 11. CCI OB & OS FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_CCI_OBOS_Filter (Default: false) -> Enables or disables extreme CCI momentum breakout confirmation.
- CCI_OBOS_Period (Default: 14) -> Calculation period in bars for the momentum CCI filter.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Applied price source for the momentum CCI calculation.
- CCI_Overbought (Default: 100.0) -> Upper CCI threshold level for bullish momentum confirmation.
- CCI_Oversold (Default: -100.0) -> Lower CCI threshold level for bearish momentum confirmation.
Filter 12: Relative Vigor Index (RVI) Filters
- InpFilter12 (Default: "=== 12. RVI FILTERS ===") -> Visual section separator header in the Inputs tab.
- Use_RVI_Filter (Default: false) -> Enables or disables RVI main line zero-level directional filtering.
- RVI_Period (Default: 75) -> Calculation period in bars for the RVI zero-level trend filter.
- Use_RVI_Signal_Filter (Default: false) -> Enables or disables RVI main-versus-signal line crossover alignment filtering.
- RVI_Signal_Period (Default: 20) -> Calculation period in bars for the RVI signal crossover filter.
Filter 13: MACD Histogram and Zero-Line Filters
- InpFilter13 (Default: "=== 13. MACD FILTERS ===") -> Visual section separator header in the Inputs tab.
- Use_MACD_Filter (Default: false) -> Enables or disables MACD histogram polarity filtering (Main line above or below Signal line).
- MACD_FastEMA (Default: 12) -> Fast Exponential Moving Average period in bars for MACD.
- MACD_SlowEMA (Default: 26) -> Slow Exponential Moving Average period in bars for MACD.
- MACD_SignalSMA (Default: 9) -> Signal Simple Moving Average period in bars for MACD.
- MACD_Applied (Default: PRICE_CLOSE) -> Applied price source for MACD calculation.
- Use_MACD_Zero_Filter (Default: false) -> Enables or disables MACD main line position filtering relative to the zero level.
Filter 14: Support/Resistance and Fibonacci Retracement Filters
- InpFilter14 (Default: "=== 14. SR & FIBONACCI FILTERS ===") -> Visual section separator header in the Inputs tab.
- Use_SR_Filter (Default: false) -> Enables or disables proximity filtering near recent swing Support and Resistance zones.
- SR_Period (Default: 50) -> Lookback window in bars used to identify recent highest high and lowest low boundaries.
- SR_Zone_Points (Default: 80) -> Tolerance buffer zone in points around identified Support and Resistance levels.
- Use_Fib_Filter (Default: false) -> Enables or disables swing Fibonacci retracement zone validation.
- Fib_Level_1 (Default: 0.382) -> First Fibonacci retracement ratio boundary (38.2%).
- Fib_Level_2 (Default: 0.618) -> Second Fibonacci retracement ratio boundary (61.8%).
- ZigZag_Depth (Default: 12) -> Minimum bar depth parameter for internal swing pivot detection.
- ZigZag_Deviation (Default: 5) -> Minimum price deviation in points for internal swing pivot detection.
- ZigZag_Backstep (Default: 3) -> Minimum bar separation between consecutive swing pivots.
Filter 15: Supertrend Filter
- InpFilter15 (Default: "=== 15. SUPERTREND FILTER ===") -> Visual section separator header in the Inputs tab.
- Use_Supertrend_Filter (Default: false) -> Enables or disables ATR-based Supertrend directional regime filtering.
- ST_AtrPeriod (Default: 10) -> ATR lookback length in bars for the Supertrend calculation.
- ST_Factor (Default: 3.0) -> Volatility multiplier factor determining Supertrend band distance.
Risk Disclaimer
Trading foreign exchange, commodities, and other financial instruments involves significant risk and may not be suitable for all investors. Past performance does not guarantee future results. This software is an analytical and operational tool designed to assist traders in technical analysis; it does not guarantee financial profit. Always thoroughly test the product on a demo account to understand its operational behavior before considering deployment in live trading environments.
