Indicateur

RSI Failure Swing Detector [AGPro Series]RSI Failure Swing Detector
🔹 **Overview**
RSI Failure Swing Detector is a focused RSI reversal-structure tool built around one classic momentum concept: the confirmed RSI failure swing.
Instead of treating every oversold or overbought RSI reading as a reversal condition, this script waits for the full internal RSI sequence:
1. RSI reaches an extreme zone.
2. RSI recovers or reacts away from that extreme.
3. RSI pulls back while respecting the original RSI extreme.
4. RSI breaks the internal swing level that confirms the failure swing.
Only after that sequence is complete does the script mark a confirmed trigger on the chart.
The purpose is to make RSI failure swings easier to read in real time without turning the tool into a generic divergence scanner, RSI pressure map, or broad reversal dashboard.
🔹 **What Makes It Different**
Most RSI tools focus on one of three common ideas:
- RSI overbought and oversold levels.
- RSI divergence against price.
- RSI momentum or pressure state.
This script is intentionally different.
RSI Failure Swing Detector does not look for RSI divergence. It does not compare RSI swings against price swings to create hidden or regular divergence logic. It also does not measure RSI pressure, trend pressure, or directional dominance.
Its job is narrower and cleaner:
**It detects when RSI builds a classic failure swing sequence and then confirms that sequence through an internal RSI swing break.**
That keeps the tool separated from existing AGPro momentum scripts such as RSI Pressure Map, Stochastic Exhaustion Map, Multi-Oscillator Consensus Engine, Divergence Stack Scanner, and broader reversal-quality tools. The analytical lane here is not "is pressure building?" or "is price diverging?" The lane is:
**Has RSI completed a confirmed failure swing sequence?**
🔹 **Core Logic**
The bullish model starts when RSI moves into the oversold zone. The script then tracks the first recovery leg, waits for a pullback that stays meaningfully above the original RSI low, and confirms the pattern only when RSI breaks the recovery high.
The bearish model works in the opposite direction. It starts when RSI moves into the overbought zone, tracks the first reaction leg, waits for a bounce that stays meaningfully below the original RSI high, and confirms the pattern only when RSI breaks the reaction low.
This creates a clean four-part sequence:
- Extreme
- Recovery or reaction
- Controlled pullback
- Confirmed internal break
The confirmation step is important. The script is designed to avoid printing premature reversal labels while RSI is still only sitting at an extreme.
🔹 **Trigger Pockets**
When a failure swing is confirmed, the script can project a short chart-level trigger pocket from the confirmation bar.
These pockets are not generic support or resistance zones. They are failure-swing context zones designed to help the user visually track whether price respects or loses the area around a confirmed momentum trigger.
The pocket is time-limited, ATR-scaled, and capped by a maximum visible pocket setting so the chart remains clean.
🔹 **Panel**
The AGPro panel summarizes the active environment:
- RSI State
- Swing Stage
- Confirmation
- Sequence Score
- Trigger Pocket status
The first panel row follows the AGPro standard: one merged blue header row containing only the script title. Panel location, panel theme, label size, and panel font size are all configurable from settings.
🔹 **Visual Design**
The chart layer is intentionally restrained.
Stage labels explain where the RSI sequence is developing, while confirmed trigger labels appear only after the failure swing is complete. The default stage-label mode highlights only the final setup stage before confirmation, keeping lower-timeframe charts cleaner while still preserving the sequence logic.
Label cooldowns, maximum visible label limits, ATR-based offsets, compact trigger labels, and capped trigger pockets are included to keep the chart readable.
The default visual style is designed for a premium public chart: informative, but not crowded.
🔹 **Inputs**
Key settings include:
- RSI Length
- RSI Source
- Oversold Level
- Overbought Level
- Minimum RSI Separation
- Minimum RSI Pullback
- Maximum Sequence Bars
- Confirm On Bar Close
- Stage Label Detail
- Trigger Pocket Depth
- Trigger Pocket Projection Bars
- Panel Signal Memory Bars
- Label and panel size controls
- Panel location and theme controls
These settings allow the user to tune the detector for different symbols and timeframes while preserving the core failure swing structure.
🔹 **Best Use Case**
RSI Failure Swing Detector is best used when the trader wants a clean visual framework for RSI reversal structure without adding divergence complexity or broad pressure-state interpretation.
It can be useful for reviewing moments when RSI fails to retest its prior extreme and then confirms a momentum turn through its own internal swing level.
It is designed to organize one specific RSI pattern with cleaner confirmation, better visual hierarchy, and a focused chart workflow.
Indicateur
