RSI Patterns
- Indicatori
- Versione: 1.0
- Attivazioni: 5
Overview
RSI Patterns is a technical analysis indicator for MetaTrader 5 designed to evaluate momentum structure, dynamic oscillator regimes, and recurring chart-oscillator patterns using the Relative Strength Index (RSI) alongside price action.
Instead of relying solely on fixed 70/30 thresholds, the indicator combines a regime-aware RSI oscillator, fast and slow momentum moving averages (Simple Moving Average (SMA) and Weighted Moving Average (WMA)), swing-based pattern recognition, optional Average Directional Index (ADX) filtering, projected price objectives, Average True Range (ATR) reference levels, and a compact Heads-Up Display (HUD) with an integrated Multi-Timeframe (MTF) scanner.
Key Features
- Regime-Colored RSI & Dynamic Bounds: Colors the RSI line according to the active bullish, bearish, or neutral regime and displays dynamic upper/lower operating bounds on the sub-window.
- Momentum Moving Averages on RSI: Plots a fast Simple Moving Average (SMA) and a slower Weighted Moving Average (WMA) directly on the RSI to help assess short-term and baseline oscillator momentum.
- Swing Pattern Detection (Non-Repainting Confirmation): Signal arrows, pattern labels, alerts, and EA buffer outputs are generated strictly at the close of the confirmation bar ( Shift 1 ), once the required right-side swing confirmation bars have closed. Confirmed signals never disappear or shift retroactively. Connecting lines trace the two underlying swing pivots that formed the pattern, while the signal marker and projected target start directly on the confirmation bar.
- Projected Price Targets & Historical Hit Rate: Draws projected price objective levels on the main chart for qualifying reversal setups and tracks how many resolved targets were reached versus expired.
- Risk Reference Levels: Optionally plots reference entry, Stop Loss (SL), and Take Profit (TP) lines derived from the Average True Range (ATR) for the most recent signal.
- Compact HUD & MTF Scanner: Summarizes current RSI readings, active zone, pattern counts, target hit rate, and live status across M5 (5-minute), M15 (15-minute), H1 (1-hour), H4 (4-hour), and D1 (Daily) timeframes.
- Configurable Alerts & EA Buffers: Supports MetaTrader 5 popups, sound alerts, push notifications, emails, and exposes calculation buffers for integration with an Expert Advisor (EA).
Detected Patterns & Signals
Below are the labels displayed on the sub-window and HUD, along with the full meaning of each abbreviation:
- Positive Reversal ( +REV ): A bullish continuation pattern detected when price forms a higher swing low while the Relative Strength Index (RSI) forms a lower swing low. Projects an upward measured price target on the main chart.
- Negative Reversal ( -REV ): A bearish continuation pattern detected when price forms a lower swing high while the RSI forms a higher swing high. Projects a downward measured price target on the main chart.
- Super Positive Reversal ( *SUPER +REV ): A higher-confluence Positive Reversal ( +REV ) that develops shortly after a Bearish Divergence ( BEAR DIV ) near the lower bullish support zone.
- Super Negative Reversal ( *SUPER -REV ): A higher-confluence Negative Reversal ( -REV ) that develops shortly after a Bullish Divergence ( BULL DIV ) near the upper bearish resistance zone.
- Classic Bullish Divergence ( BULL DIV ): Detected when price makes a lower low while the RSI makes a higher low, highlighting potential downward exhaustion or counter-trend reaction.
- Classic Bearish Divergence ( BEAR DIV ): Detected when price makes a higher high while the RSI makes a lower high, highlighting potential upward exhaustion or pullback risk.
- Bullish Regime Shift ( SHIFT 40-80 ): Signals that the oscillator and trend filter have transitioned into the upper bullish operating range.
- Bearish Regime Shift ( SHIFT 20-60 ): Signals that the oscillator and trend filter have transitioned into the lower bearish operating range.
- Bullish Support Bounce ( 40 BOUNCE ): Signals an upward momentum reaction when the RSI rebounds from the bullish support zone while price remains aligned with the trend reference.
- Bearish Resistance Rejection ( 60 REJECT ): Signals a downward momentum reaction when the RSI turns down from the bearish resistance zone while price remains aligned with the downtrend reference.
HUD & MTF Scanner Abbreviations
- OB ( Overbought ): Readings above the upper extreme threshold.
- OS ( Oversold ): Readings below the lower extreme threshold.
- 40SUP ( 40 Support ): Price and RSI situated near the lower bullish support area.
- 60RES ( 60 Resistance ): Price and RSI situated near the upper bearish resistance area.
- NEUT ( Neutral ): Transitional or range-bound readings between regimes.
Input Parameters
1. RSI Engine & Momentum Moving Averages
- RSI Period: Lookback period used for the internal RSI calculations.
- RSI Applied Price: Price field (such as Close, Median, or Typical) fed into the RSI calculation.
- Fast RSI SMA Period: Lookback period for the fast Simple Moving Average (SMA) plotted over the RSI.
- Slow RSI WMA Period: Lookback period for the slower Weighted Moving Average (WMA) plotted over the RSI.
- Max History Bars to Analyze: Maximum number of recent historical bars scanned for pattern detection and visual objects.
2. Dynamic Regime Bands (40/80 & 20/60)
- Bull Regime Low: Lower boundary used to define the bullish RSI operating zone.
- Bull Regime High: Upper boundary used to define the bullish RSI operating zone.
- Bear Regime Low: Lower boundary used to define the bearish RSI operating zone.
- Bear Regime High: Upper boundary used to define the bearish RSI operating zone.
- Regime Trend SMA Period: Lookback period for the price Simple Moving Average (SMA) used as the regime trend reference.
- Regime Confirmation Bars: Number of consecutive bars required before confirming a regime change.
- Enable ADX Sideways Filter: Enables or disables the Average Directional Index (ADX) filter to suppress regime-shift signals during low-strength markets.
- ADX Period: Lookback period used for the internal ADX calculation.
- Minimum ADX Strength: Minimum ADX value required when the sideways filter is active.
- Detect Support/Resistance Zone Bounces: Enables or disables detection of 40 BOUNCE and 60 REJECT momentum reactions.
3. Reversals, Divergences & Price Targets
- Swing Pivot Length: Number of bars to the left and right used to confirm price swing highs and lows.
- Max Bars Between Swings: Maximum bar distance allowed between two consecutive swings forming a pattern.
- Signal Direction Filter: Restricts signal output to both directions, bullish patterns only, or bearish patterns only.
- Mid-Range Swings Only: When enabled, filters out reversal swings formed inside extreme Overbought (OB) or Oversold (OS) territory.
- Overbought Reference Level: Upper threshold used for visual reference and mid-range filtering.
- Oversold Reference Level: Lower threshold used for visual reference and mid-range filtering.
- Enable Macro Trend SMA Filter: Requires reversal patterns to align with a longer-term Simple Moving Average (SMA) trend filter.
- Macro Trend SMA Period: Lookback period for the macro trend SMA filter.
- Detect Divergences & Super-Setups: Enables or disables classic divergence detection and combined super-setup labeling.
- Super-Setup Lookback Window (Bars): Maximum number of bars after a divergence in which a subsequent reversal can qualify as a super-setup.
- Show Measured Price Targets: Displays projected price objective lines on the main chart for qualifying reversal signals.
- Target Expiration (Bars): Maximum number of bars an unreached price target continues extending before expiring.
4. Risk Levels & Chart Visuals
- Show Pattern Lines on Main Chart: Draws connecting lines between pattern swing points on the main price chart.
- Show Pattern Lines in RSI Sub-Window: Draws connecting lines between pattern swing points inside the RSI sub-window.
- Show Pattern Labels: Displays pattern text labels inside the RSI sub-window.
- Highlight Key Support/Resistance Zones: Shades the internal bullish support and bearish resistance bands in the RSI sub-window.
- Max Recent Patterns Drawn: Limits the number of historical pattern drawings kept on the chart to maintain visual clarity.
- Show Entry / SL / TP Levels (Last Signal): Plots reference Entry, Stop Loss (SL), and three Take Profit (TP1, TP2, TP3) lines for the most recent signal.
- ATR Period for Risk Levels: Lookback period used for the Average True Range (ATR) volatility reference.
- Stop Loss ATR Multiplier: Distance multiplier applied to the ATR to place the reference Stop Loss line.
- Take Profit 1 ATR Multiplier: Distance multiplier applied to the ATR for the TP1 reference line.
- Take Profit 2 ATR Multiplier: Distance multiplier applied to the ATR for the TP2 reference line.
- Take Profit 3 ATR Multiplier: Distance multiplier applied to the ATR for the TP3 reference line.
5. HUD Panel & Multi-Timeframe Scanner
- Show HUD Panel: Shows or hides the compact summary Heads-Up Display (HUD) panel.
- Show Multi-Timeframe Scanner (M5-D1): Shows or hides the Multi-Timeframe (MTF) scanner row for M5, M15, H1, H4, and D1 inside the HUD.
- HUD Display Window: Selects whether the HUD is drawn on the main chart or inside the RSI sub-window.
- HUD Corner Position: Selects the chart corner where the HUD panel is anchored (defaults to Top Left).
- Pattern Count Lookback Window (Bars): Lookback window in bars used to count recent patterns displayed in the HUD.
6. Colors & Styling
- Bullish Color: Color used for bullish RSI segments, lines, and labels.
- Bearish Color: Color used for bearish RSI segments, lines, and labels.
- Neutral Color: Color used for neutral or transitional states.
- Super-Setup Color: Highlight color for higher-confluence super-setup patterns.
- Divergence Color: Color used for classic divergence lines and labels.
- HUD Background Color: Background fill color of the HUD panel.
- HUD Border Color: Border color of the HUD panel.
7. Alerts
- Alert on Positive / Negative Reversals: Triggers alerts when +REV or -REV patterns confirm on bar close.
- Alert on Super-Setups: Triggers alerts when *SUPER +REV or *SUPER -REV patterns confirm on bar close.
- Alert on Regime Shifts: Triggers alerts when a new bullish or bearish regime shift is confirmed.
- Alert on Zone Bounces / Rejections: Triggers alerts on 40 BOUNCE or 60 REJECT signals.
- Alert on Price Target Reached: Triggers alerts when price reaches an active measured target.
- Enable MT5 Popup Alert: Displays standard MetaTrader 5 popup alerts.
- Enable Sound Alert: Plays an audio file when an alert triggers.
- Sound File Name: Audio filename from the MetaTrader 5 Sounds folder.
- Enable Mobile Push Notification: Sends alerts to the MetaTrader 5 mobile app (requires MetaQuotes ID configured in terminal settings).
- Enable Email Notification: Sends alert emails (requires SMTP configured in terminal settings).
Confirmation & Non-Repainting Behavior
- Confirmed Signals ( Shift 1 ): All pattern detections, signal arrows, pattern labels, alert triggers, and calculation buffer signals are evaluated on closed bars only. Swing-based patterns require Swing Pivot Length closed bars to the right of the second swing before confirmation, and the resulting signal arrow, label, and projected target start on that exact confirmation bar—without back-painting arrows onto earlier bars. Once a bar closes, its confirmed signal does not repaint or vanish.
- Live Forming Bar ( Shift 0 ): As with standard MetaTrader 5 oscillators, the RSI line, moving averages, regime coloring on the currently forming candle, and the live Multi-Timeframe (MTF) scanner reflect live intrabar price updates until each candle closes.
Disclaimer
RSI Patterns is provided strictly for technical analysis and educational purposes. All pattern detections, regime classifications, projected targets, and ATR reference levels are analytical tools derived from historical price data and do not guarantee future market performance.
Nothing displayed by this indicator constitutes financial, investment, or trading advice. Trading financial instruments involves substantial risk of loss; always apply independent judgment and proper risk management.
